Skip to content

Commit a674e3e

Browse files
committed
Updated tests for encoding sparse/mixed key-type tables
1 parent 70556cc commit a674e3e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

test/test.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,9 @@ test("encode invalid", function()
196196
{ [1000] = "b" },
197197
{ [ function() end ] = 12 },
198198
{ nil, 2, 3, 4 },
199+
{ x = 10, [1] = 2 },
200+
{ [1] = "a", [3] = "b" },
201+
{ x = 10, [4] = 5 },
199202
}
200203
for i, v in ipairs(t) do
201204
local status, res = pcall(json.encode, v)

0 commit comments

Comments
 (0)