diff options
Diffstat (limited to '')
-rw-r--r-- | tests/common.lua | 2 | ||||
-rwxr-xr-x | tests/test.lua | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/tests/common.lua b/tests/common.lua index 48b4197..156f882 100644 --- a/tests/common.lua +++ b/tests/common.lua | |||
@@ -31,7 +31,7 @@ end | |||
31 | 31 | ||
32 | function serialise_table(value, indent, depth) | 32 | function serialise_table(value, indent, depth) |
33 | local spacing, spacing2, indent2 | 33 | local spacing, spacing2, indent2 |
34 | if indent then | 34 | if indent then |
35 | spacing = "\n" .. indent | 35 | spacing = "\n" .. indent |
36 | spacing2 = spacing .. " " | 36 | spacing2 = spacing .. " " |
37 | indent2 = indent .. " " | 37 | indent2 = indent .. " " |
diff --git a/tests/test.lua b/tests/test.lua index 4bb62be..bfa4f66 100755 --- a/tests/test.lua +++ b/tests/test.lua | |||
@@ -43,7 +43,7 @@ local function gen_utf16_escaped() | |||
43 | end | 43 | end |
44 | end | 44 | end |
45 | table.insert(utf16_escaped, '"') | 45 | table.insert(utf16_escaped, '"') |
46 | 46 | ||
47 | return table.concat(utf16_escaped) | 47 | return table.concat(utf16_escaped) |
48 | end | 48 | end |
49 | 49 | ||
@@ -120,10 +120,10 @@ local encode_table_tests = { | |||
120 | true, { '[null,null,"sparse test"]' } }, | 120 | true, { '[null,null,"sparse test"]' } }, |
121 | 121 | ||
122 | { json.encode, { { [1] = "one", [4] = "sparse test" } }, | 122 | { json.encode, { { [1] = "one", [4] = "sparse test" } }, |
123 | true, { '["one",null,null,"sparse test"]' } }, | 123 | true, { '["one",null,null,"sparse test"]' } }, |
124 | 124 | ||
125 | { json.encode, { { [1] = "one", [5] = "sparse test" } }, | 125 | { json.encode, { { [1] = "one", [5] = "sparse test" } }, |
126 | true, { '{"1":"one","5":"sparse test"}' } }, | 126 | true, { '{"1":"one","5":"sparse test"}' } }, |
127 | 127 | ||
128 | { json.encode, { nested5 }, true, { '[[[[["nested"]]]]]' } }, | 128 | { json.encode, { nested5 }, true, { '[[[[["nested"]]]]]' } }, |
129 | { json.encode, { { nested5 } }, | 129 | { json.encode, { { nested5 } }, |