aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorlijunlong <lijunlong@openresty.com>2026-02-10 09:08:50 +0800
committerlijunlong <lijunlong@openresty.com>2026-02-10 09:08:52 +0800
commitc305d55c7f321c01b4d135ef6d41879fd5f8e9f5 (patch)
treea7c5de1ef4ff7a5e83d55e60fa0e173832308575 /tests
parentfed8c8356be4d94ceb55f2880bdb77fd9b55ef1e (diff)
downloadlua-cjson-c305d55c7f321c01b4d135ef6d41879fd5f8e9f5.tar.gz
lua-cjson-c305d55c7f321c01b4d135ef6d41879fd5f8e9f5.tar.bz2
lua-cjson-c305d55c7f321c01b4d135ef6d41879fd5f8e9f5.zip
optimize: rename cjson.decoce_allow_comments to cjson.decocde_allow_comment.HEADmaster
reslove two warnings and update the doc.
Diffstat (limited to '')
-rwxr-xr-xtests/test.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/test.lua b/tests/test.lua
index 068a9f0..270f63a 100755
--- a/tests/test.lua
+++ b/tests/test.lua
@@ -334,8 +334,8 @@ local cjson_tests = {
334 false, { "Expected value but found invalid unicode escape code at character 2" } }, 334 false, { "Expected value but found invalid unicode escape code at character 2" } },
335 335
336 -- Test comments 336 -- Test comments
337 { 'Set decode_allow_comments(true)', 337 { 'Set decode_allow_comment(true)',
338 json.decode_allow_comments, { true }, true, { true } }, 338 json.decode_allow_comment, { true }, true, { true } },
339 { "Decode single-line comment", 339 { "Decode single-line comment",
340 json.decode, { '{//comment\n}' }, true, { {} } }, 340 json.decode, { '{//comment\n}' }, true, { {} } },
341 { "Decode single-line comment with windows newline", 341 { "Decode single-line comment with windows newline",
@@ -356,8 +356,8 @@ local cjson_tests = {
356 { "Decode comment inside number [throw error]", 356 { "Decode comment inside number [throw error]",
357 json.decode, { '{"a":1/*x*/0}' }, 357 json.decode, { '{"a":1/*x*/0}' },
358 false, { "Expected comma or object end but found T_INTEGER at character 12" } }, 358 false, { "Expected comma or object end but found T_INTEGER at character 12" } },
359 { 'Set decode_allow_comments(false)', 359 { 'Set decode_allow_comment(false)',
360 json.decode_allow_comments, { false }, true, { false } }, 360 json.decode_allow_comment, { false }, true, { false } },
361 361
362 -- Test indenting 362 -- Test indenting
363 { 'Set encode_indent(" ")', 363 { 'Set encode_indent(" ")',