File: disable-sparse-array-test

package info (click to toggle)
lua-cjson 2.1.0%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 528 kB
  • sloc: ansic: 5,207; sh: 73; makefile: 52; perl: 9
file content (18 lines) | stat: -rw-r--r-- 877 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
diff --git a/tests/test.lua b/tests/test.lua
index 31e7270..5d5c359 100755
--- a/tests/test.lua
+++ b/tests/test.lua
@@ -289,9 +289,10 @@ local cjson_tests = {
     { "Encode sparse table as array #2",
       json.encode, { { [1] = "one", [4] = "sparse test" } },
       true, { '["one",null,null,"sparse test"]' } },
-    { "Encode sparse array as object",
-      json.encode, { { [1] = "one", [5] = "sparse test" } },
-      true, { '{"1":"one","5":"sparse test"}' } },
+    -- buggy: the sequence of sparse array cannot be predetermined
+    -- { "Encode sparse array as object",
+    --   json.encode, { { [1] = "one", [5] = "sparse test" } },
+    --   true, { '{"1":"one","5":"sparse test"}' } },
     { "Encode table with numeric string key as object",
       json.encode, { { ["2"] = "numeric string key test" } },
       true, { '{"2":"numeric string key test"}' } },