diff options
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/test.lua | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/test.lua b/tests/test.lua index d1bf7e4..b2162b9 100755 --- a/tests/test.lua +++ b/tests/test.lua | |||
@@ -293,7 +293,12 @@ local cjson_tests = { | |||
293 | true, { '["one",null,null,"sparse test"]' } }, | 293 | true, { '["one",null,null,"sparse test"]' } }, |
294 | { "Encode sparse array as object", | 294 | { "Encode sparse array as object", |
295 | json.encode, { { [1] = "one", [5] = "sparse test" } }, | 295 | json.encode, { { [1] = "one", [5] = "sparse test" } }, |
296 | true, { '{"5":"sparse test","1":"one"}' } }, | 296 | true, { |
297 | util.one_of{ | ||
298 | '{"5":"sparse test","1":"one"}', | ||
299 | '{"1":"one","5":"sparse test"}' | ||
300 | } | ||
301 | } }, | ||
297 | { "Encode table with numeric string key as object", | 302 | { "Encode table with numeric string key as object", |
298 | json.encode, { { ["2"] = "numeric string key test" } }, | 303 | json.encode, { { ["2"] = "numeric string key test" } }, |
299 | true, { '{"2":"numeric string key test"}' } }, | 304 | true, { '{"2":"numeric string key test"}' } }, |