From 77ed1bd68b07358d55cf7fc29eaffe1d311a37f7 Mon Sep 17 00:00:00 2001 From: Cloud Wu Date: Thu, 20 Apr 2017 18:48:15 +0800 Subject: [PATCH] add check for testbson --- test/testbson.lua | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/test/testbson.lua b/test/testbson.lua index d589f01f..815ffdef 100644 --- a/test/testbson.lua +++ b/test/testbson.lua @@ -1,6 +1,13 @@ local bson = require "bson" -sub = bson.encode_order( "hello", 1, "world", 2 ) +local sub = bson.encode_order( "hello", 1, "world", 2 ) + +do + -- check decode encode_order + local d = bson.decode(sub) + assert(d.hello == 1 ) + assert(d.world == 2 ) +end local function tbl_next(...) print("--- next.a", ...)