summaryrefslogtreecommitdiff
path: root/tests/modules/json/test.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2022-09-07 22:03:29 +0800
committerruki <[email protected]>2022-09-07 22:03:29 +0800
commitc25a0a9fc9e50be84c55ded5fe3b2bf2558791b7 (patch)
tree625c1951e1161106b907d904199823dc60dcbeea /tests/modules/json/test.lua
parent1e56c8877406df41ed79aa098fcabc2a63ca1da9 (diff)
improve json tests
Diffstat (limited to 'tests/modules/json/test.lua')
-rwxr-xr-xtests/modules/json/test.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/modules/json/test.lua b/tests/modules/json/test.lua
index b6774392c..7256223d4 100755
--- a/tests/modules/json/test.lua
+++ b/tests/modules/json/test.lua
@@ -13,7 +13,7 @@ end
-- test encode
function test_json_encode(t)
t:are_equal(json.encode({}), '{}')
- t:are_equal(json.encode({}), '{}')
+ t:are_equal(json.encode(json.mark_as_array({})), '[]')
t:are_equal(json.encode({json.null, 1, "2", false, true}), '[null,1,"2",false,true]')
t:are_equal(json.encode({1, "2", {a = 1}}), '[1,"2",{"a":1}]')
t:are_equal(json.encode({1, "2", {b = true}}), '[1,"2",{"b":true}]')