From a674e3ec0f6733105d29af3a6c3d3369cd33e07d Mon Sep 17 00:00:00 2001 From: rxi Date: Sun, 30 Aug 2015 19:11:19 +0100 Subject: [PATCH] Updated tests for encoding sparse/mixed key-type tables --- test/test.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/test.lua b/test/test.lua index 773e799..1886823 100644 --- a/test/test.lua +++ b/test/test.lua @@ -196,6 +196,9 @@ test("encode invalid", function() { [1000] = "b" }, { [ function() end ] = 12 }, { nil, 2, 3, 4 }, + { x = 10, [1] = 2 }, + { [1] = "a", [3] = "b" }, + { x = 10, [4] = 5 }, } for i, v in ipairs(t) do local status, res = pcall(json.encode, v)