diff options
| author | Conrad Kostecki <conikost@gentoo.org> | 2022-12-15 22:11:36 +0100 |
|---|---|---|
| committer | Conrad Kostecki <conikost@gentoo.org> | 2022-12-15 22:11:36 +0100 |
| commit | c2e3f6ea330492f79bb40b7b1c7a5ed98e522faf (patch) | |
| tree | 8c68d2a1f39d6d8638ea7c3935a9c68315ff9485 /dev-lua/lua-cjson/files/lua-cjson-2.1.0.8-sparse_array_test_fix.patch | |
| parent | 594ddc3101ab7a86005b414884d24e7c98db439b (diff) | |
| download | gentoo-c2e3f6ea330492f79bb40b7b1c7a5ed98e522faf.tar.gz gentoo-c2e3f6ea330492f79bb40b7b1c7a5ed98e522faf.tar.bz2 gentoo-c2e3f6ea330492f79bb40b7b1c7a5ed98e522faf.zip | |
dev-lua/lua-cjson: drop 2.1.0.8-r1
Signed-off-by: Conrad Kostecki <conikost@gentoo.org>
Diffstat (limited to 'dev-lua/lua-cjson/files/lua-cjson-2.1.0.8-sparse_array_test_fix.patch')
| -rw-r--r-- | dev-lua/lua-cjson/files/lua-cjson-2.1.0.8-sparse_array_test_fix.patch | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/dev-lua/lua-cjson/files/lua-cjson-2.1.0.8-sparse_array_test_fix.patch b/dev-lua/lua-cjson/files/lua-cjson-2.1.0.8-sparse_array_test_fix.patch deleted file mode 100644 index e031672dae33..000000000000 --- a/dev-lua/lua-cjson/files/lua-cjson-2.1.0.8-sparse_array_test_fix.patch +++ /dev/null @@ -1,31 +0,0 @@ ---- a/tests/test.lua -+++ b/tests/test.lua -@@ -10,6 +10,17 @@ - local json_safe = require "cjson.safe" - local util = require "cjson.util" - -+local function json_encode_output_type(value) -+ local text = json.encode(value) -+ if string.match(text, "{.*}") then -+ return "object" -+ elseif string.match(text, "%[.*%]") then -+ return "array" -+ else -+ return "scalar" -+ end -+end -+ - local function gen_raw_octets() - local chars = {} - for i = 0, 255 do chars[i + 1] = string.char(i) end -@@ -292,8 +303,8 @@ - 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, { '{"5":"sparse test","1":"one"}' } }, -+ json_encode_output_type, { { [1] = "one", [5] = "sparse test" } }, -+ true, { 'object' } }, - { "Encode table with numeric string key as object", - json.encode, { { ["2"] = "numeric string key test" } }, - true, { '{"2":"numeric string key test"}' } }, |
