From 34bc3263629d428e9284de00e75924614f627544 Mon Sep 17 00:00:00 2001 From: ahgamut <41098605+ahgamut@users.noreply.github.com> Date: Tue, 12 Jul 2022 02:12:14 +0530 Subject: [PATCH] separated the tests where ljson is lenient --- test/tool/net/samples/JSONTestSuite-fail1.lua | 92 ------------------ test/tool/net/samples/JSONTestSuite-fail2.lua | 32 ------ test/tool/net/samples/JSONTestSuite-fail4.lua | 27 ----- .../net/samples/JSONTestSuite-lenient.lua | Bin 0 -> 10336 bytes 4 files changed, 151 deletions(-) create mode 100644 test/tool/net/samples/JSONTestSuite-lenient.lua diff --git a/test/tool/net/samples/JSONTestSuite-fail1.lua b/test/tool/net/samples/JSONTestSuite-fail1.lua index 735db64c3..8a592dc1a 100644 --- a/test/tool/net/samples/JSONTestSuite-fail1.lua +++ b/test/tool/net/samples/JSONTestSuite-fail1.lua @@ -36,9 +36,6 @@ assert(false == pcall(DecodeJson, [[ {"a" ]])) -- https://github.com/nst/JSONTestSuite/tree/d64aefb55228d9584d3e5b2433f720ea8fd00c82/test_parsing/n_object_missing_value.json assert(false == pcall(DecodeJson, [[ {"a": ]])) --- https://github.com/nst/JSONTestSuite/tree/d64aefb55228d9584d3e5b2433f720ea8fd00c82/test_parsing/n_object_missing_semicolon.json -assert(false == pcall(DecodeJson, [[ {"a" "b"} ]])) - -- https://github.com/nst/JSONTestSuite/tree/d64aefb55228d9584d3e5b2433f720ea8fd00c82/test_parsing/n_object_missing_key.json assert(false == pcall(DecodeJson, [[ {:"b"} ]])) @@ -59,21 +56,9 @@ assert(false == pcall(DecodeJson, [[ {"a":"a" 123} ]])) -- (converted to binary for safety) assert(false == pcall(DecodeJson, [[ \x7b\xf0\x9f\x87\xa8\xf0\x9f\x87\xad\x7d ]])) --- https://github.com/nst/JSONTestSuite/tree/d64aefb55228d9584d3e5b2433f720ea8fd00c82/test_parsing/n_object_double_colon.json -assert(false == pcall(DecodeJson, [[ {"x"::"b"} ]])) - --- https://github.com/nst/JSONTestSuite/tree/d64aefb55228d9584d3e5b2433f720ea8fd00c82/test_parsing/n_object_comma_instead_of_colon.json -assert(false == pcall(DecodeJson, [[ {"x", null} ]])) - -- https://github.com/nst/JSONTestSuite/tree/d64aefb55228d9584d3e5b2433f720ea8fd00c82/test_parsing/n_object_bracket_key.json assert(false == pcall(DecodeJson, [[ {[: "x"} ]])) --- https://github.com/nst/JSONTestSuite/tree/d64aefb55228d9584d3e5b2433f720ea8fd00c82/test_parsing/n_object_bad_value.json -assert(false == pcall(DecodeJson, [[ ["x", truth] ]])) - --- https://github.com/nst/JSONTestSuite/tree/d64aefb55228d9584d3e5b2433f720ea8fd00c82/test_parsing/n_number_with_leading_zero.json -assert(false == pcall(DecodeJson, [[ [012] ]])) - -- https://github.com/nst/JSONTestSuite/tree/d64aefb55228d9584d3e5b2433f720ea8fd00c82/test_parsing/n_number_with_alpha_char.json assert(false == pcall(DecodeJson, [[ [1.8011670033376514H-308] ]])) @@ -83,9 +68,6 @@ assert(false == pcall(DecodeJson, [[ [1.2a-3] ]])) -- https://github.com/nst/JSONTestSuite/tree/d64aefb55228d9584d3e5b2433f720ea8fd00c82/test_parsing/n_number_starting_with_dot.json assert(false == pcall(DecodeJson, [[ [.123] ]])) --- https://github.com/nst/JSONTestSuite/tree/d64aefb55228d9584d3e5b2433f720ea8fd00c82/test_parsing/n_number_real_without_fractional_part.json -assert(false == pcall(DecodeJson, [[ [1.] ]])) - -- https://github.com/nst/JSONTestSuite/tree/d64aefb55228d9584d3e5b2433f720ea8fd00c82/test_parsing/n_number_real_with_invalid_utf8_after_e.json -- (converted to binary for safety) assert(false == pcall(DecodeJson, [[ \x5b\x31\x65\xe5\x5d ]])) @@ -99,12 +81,6 @@ assert(false == pcall(DecodeJson, [[ [-1x] ]])) -- https://github.com/nst/JSONTestSuite/tree/d64aefb55228d9584d3e5b2433f720ea8fd00c82/test_parsing/n_number_neg_real_without_int_part.json assert(false == pcall(DecodeJson, [[ [-.123] ]])) --- https://github.com/nst/JSONTestSuite/tree/d64aefb55228d9584d3e5b2433f720ea8fd00c82/test_parsing/n_number_neg_int_starting_with_zero.json -assert(false == pcall(DecodeJson, [[ [-012] ]])) - --- https://github.com/nst/JSONTestSuite/tree/d64aefb55228d9584d3e5b2433f720ea8fd00c82/test_parsing/n_number_minus_space_1.json -assert(false == pcall(DecodeJson, [[ [- 1] ]])) - -- https://github.com/nst/JSONTestSuite/tree/d64aefb55228d9584d3e5b2433f720ea8fd00c82/test_parsing/n_number_minus_sign_with_trailing_garbage.json assert(false == pcall(DecodeJson, [[ [-foo] ]])) @@ -156,21 +132,9 @@ assert(false == pcall(DecodeJson, [[ [Inf] ]])) -- https://github.com/nst/JSONTestSuite/tree/d64aefb55228d9584d3e5b2433f720ea8fd00c82/test_parsing/n_number_9.e+.json assert(false == pcall(DecodeJson, [[ [9.e+] ]])) --- https://github.com/nst/JSONTestSuite/tree/d64aefb55228d9584d3e5b2433f720ea8fd00c82/test_parsing/n_number_2.e3.json -assert(false == pcall(DecodeJson, [[ [2.e3] ]])) - --- https://github.com/nst/JSONTestSuite/tree/d64aefb55228d9584d3e5b2433f720ea8fd00c82/test_parsing/n_number_2.e-3.json -assert(false == pcall(DecodeJson, [[ [2.e-3] ]])) - --- https://github.com/nst/JSONTestSuite/tree/d64aefb55228d9584d3e5b2433f720ea8fd00c82/test_parsing/n_number_2.e+3.json -assert(false == pcall(DecodeJson, [[ [2.e+3] ]])) - -- https://github.com/nst/JSONTestSuite/tree/d64aefb55228d9584d3e5b2433f720ea8fd00c82/test_parsing/n_number_1eE2.json assert(false == pcall(DecodeJson, [[ [1eE2] ]])) --- https://github.com/nst/JSONTestSuite/tree/d64aefb55228d9584d3e5b2433f720ea8fd00c82/test_parsing/n_number_1_000.json -assert(false == pcall(DecodeJson, [[ [1 000.0] ]])) - -- https://github.com/nst/JSONTestSuite/tree/d64aefb55228d9584d3e5b2433f720ea8fd00c82/test_parsing/n_number_1.0e.json assert(false == pcall(DecodeJson, [[ [1.0e] ]])) @@ -192,9 +156,6 @@ assert(false == pcall(DecodeJson, [[ [0E] ]])) -- https://github.com/nst/JSONTestSuite/tree/d64aefb55228d9584d3e5b2433f720ea8fd00c82/test_parsing/n_number_0_capital_E+.json assert(false == pcall(DecodeJson, [[ [0E+] ]])) --- https://github.com/nst/JSONTestSuite/tree/d64aefb55228d9584d3e5b2433f720ea8fd00c82/test_parsing/n_number_0.e1.json -assert(false == pcall(DecodeJson, [[ [0.e1] ]])) - -- https://github.com/nst/JSONTestSuite/tree/d64aefb55228d9584d3e5b2433f720ea8fd00c82/test_parsing/n_number_0.3e.json assert(false == pcall(DecodeJson, [[ [0.3e] ]])) @@ -213,15 +174,9 @@ assert(false == pcall(DecodeJson, [[ [.-1] ]])) -- https://github.com/nst/JSONTestSuite/tree/d64aefb55228d9584d3e5b2433f720ea8fd00c82/test_parsing/n_number_-NaN.json assert(false == pcall(DecodeJson, [[ [-NaN] ]])) --- https://github.com/nst/JSONTestSuite/tree/d64aefb55228d9584d3e5b2433f720ea8fd00c82/test_parsing/n_number_-2..json -assert(false == pcall(DecodeJson, [[ [-2.] ]])) - -- https://github.com/nst/JSONTestSuite/tree/d64aefb55228d9584d3e5b2433f720ea8fd00c82/test_parsing/n_number_-1.0..json assert(false == pcall(DecodeJson, [[ [-1.0.] ]])) --- https://github.com/nst/JSONTestSuite/tree/d64aefb55228d9584d3e5b2433f720ea8fd00c82/test_parsing/n_number_-01.json -assert(false == pcall(DecodeJson, [[ [-01] ]])) - -- https://github.com/nst/JSONTestSuite/tree/d64aefb55228d9584d3e5b2433f720ea8fd00c82/test_parsing/n_number_+Inf.json assert(false == pcall(DecodeJson, [[ [+Inf] ]])) @@ -231,9 +186,6 @@ assert(false == pcall(DecodeJson, [[ [+1] ]])) -- https://github.com/nst/JSONTestSuite/tree/d64aefb55228d9584d3e5b2433f720ea8fd00c82/test_parsing/n_number_++.json assert(false == pcall(DecodeJson, [[ [++1234] ]])) --- https://github.com/nst/JSONTestSuite/tree/d64aefb55228d9584d3e5b2433f720ea8fd00c82/test_parsing/n_multidigit_number_then_00.json -assert(false == pcall(DecodeJson, [[ 123 ]])) - -- https://github.com/nst/JSONTestSuite/tree/d64aefb55228d9584d3e5b2433f720ea8fd00c82/test_parsing/n_incomplete_true.json assert(false == pcall(DecodeJson, [[ [tru] ]])) @@ -265,27 +217,12 @@ assert(false == pcall(DecodeJson, [[ [*] ]])) -- (converted to binary for safety) assert(false == pcall(DecodeJson, [[ \x5b\x22\xb\x61\x22\x5c\x66\x5d ]])) --- https://github.com/nst/JSONTestSuite/tree/d64aefb55228d9584d3e5b2433f720ea8fd00c82/test_parsing/n_array_number_and_several_commas.json -assert(false == pcall(DecodeJson, [[ [1,,] ]])) - --- https://github.com/nst/JSONTestSuite/tree/d64aefb55228d9584d3e5b2433f720ea8fd00c82/test_parsing/n_array_number_and_comma.json -assert(false == pcall(DecodeJson, [[ [1,] ]])) - -- https://github.com/nst/JSONTestSuite/tree/d64aefb55228d9584d3e5b2433f720ea8fd00c82/test_parsing/n_array_newlines_unclosed.json assert(false == pcall(DecodeJson, [[ ["a", 4 ,1, ]])) --- https://github.com/nst/JSONTestSuite/tree/d64aefb55228d9584d3e5b2433f720ea8fd00c82/test_parsing/n_array_missing_value.json -assert(false == pcall(DecodeJson, [[ [ , ""] ]])) - --- https://github.com/nst/JSONTestSuite/tree/d64aefb55228d9584d3e5b2433f720ea8fd00c82/test_parsing/n_array_just_minus.json -assert(false == pcall(DecodeJson, [[ [-] ]])) - --- https://github.com/nst/JSONTestSuite/tree/d64aefb55228d9584d3e5b2433f720ea8fd00c82/test_parsing/n_array_just_comma.json -assert(false == pcall(DecodeJson, [[ [,] ]])) - -- https://github.com/nst/JSONTestSuite/tree/d64aefb55228d9584d3e5b2433f720ea8fd00c82/test_parsing/n_array_items_separated_by_semicolon.json assert(false == pcall(DecodeJson, [[ [1:2] ]])) @@ -293,11 +230,6 @@ assert(false == pcall(DecodeJson, [[ [1:2] ]])) -- (converted to binary for safety) assert(false == pcall(DecodeJson, [[ \x5b\xff\x5d ]])) --- https://github.com/nst/JSONTestSuite/tree/d64aefb55228d9584d3e5b2433f720ea8fd00c82/test_parsing/n_array_inner_array_no_comma.json --- (added spaces between [[ and ]] so lua doesn't get confused) -assert(false == pcall(DecodeJson, [[ -[ 3[ 4] ] ]])) - -- https://github.com/nst/JSONTestSuite/tree/d64aefb55228d9584d3e5b2433f720ea8fd00c82/test_parsing/n_array_incomplete_invalid_value.json -- (converted to binary for safety) assert(false == pcall(DecodeJson, [[ \x5b\x78 ]])) @@ -305,33 +237,9 @@ assert(false == pcall(DecodeJson, [[ \x5b\x78 ]])) -- https://github.com/nst/JSONTestSuite/tree/d64aefb55228d9584d3e5b2433f720ea8fd00c82/test_parsing/n_array_incomplete.json assert(false == pcall(DecodeJson, [[ ["x" ]])) --- https://github.com/nst/JSONTestSuite/tree/d64aefb55228d9584d3e5b2433f720ea8fd00c82/test_parsing/n_array_extra_comma.json -assert(false == pcall(DecodeJson, [[ ["",] ]])) - --- https://github.com/nst/JSONTestSuite/tree/d64aefb55228d9584d3e5b2433f720ea8fd00c82/test_parsing/n_array_extra_close.json --- (added spaces between [[ and ]] so lua doesn't get confused) -assert(false == pcall(DecodeJson, [[ -[ "x"] ] ]])) - --- https://github.com/nst/JSONTestSuite/tree/d64aefb55228d9584d3e5b2433f720ea8fd00c82/test_parsing/n_array_double_extra_comma.json -assert(false == pcall(DecodeJson, [[ ["x",,] ]])) - --- https://github.com/nst/JSONTestSuite/tree/d64aefb55228d9584d3e5b2433f720ea8fd00c82/test_parsing/n_array_double_comma.json -assert(false == pcall(DecodeJson, [[ [1,,2] ]])) - --- https://github.com/nst/JSONTestSuite/tree/d64aefb55228d9584d3e5b2433f720ea8fd00c82/test_parsing/n_array_comma_and_number.json -assert(false == pcall(DecodeJson, [[ [,1] ]])) - --- https://github.com/nst/JSONTestSuite/tree/d64aefb55228d9584d3e5b2433f720ea8fd00c82/test_parsing/n_array_comma_after_close.json -assert(false == pcall(DecodeJson, [[ [""], ]])) - -- https://github.com/nst/JSONTestSuite/tree/d64aefb55228d9584d3e5b2433f720ea8fd00c82/test_parsing/n_array_colon_instead_of_comma.json assert(false == pcall(DecodeJson, [[ ["": 1] ]])) -- https://github.com/nst/JSONTestSuite/tree/d64aefb55228d9584d3e5b2433f720ea8fd00c82/test_parsing/n_array_a_invalid_utf8.json -- (converted to binary for safety) assert(false == pcall(DecodeJson, [[ \x5b\x61\xe5\x5d ]])) - --- https://github.com/nst/JSONTestSuite/tree/d64aefb55228d9584d3e5b2433f720ea8fd00c82/test_parsing/n_array_1_true_without_comma.json -assert(false == pcall(DecodeJson, [[ [1 true] ]])) - diff --git a/test/tool/net/samples/JSONTestSuite-fail2.lua b/test/tool/net/samples/JSONTestSuite-fail2.lua index b4662427a..590effcfd 100644 --- a/test/tool/net/samples/JSONTestSuite-fail2.lua +++ b/test/tool/net/samples/JSONTestSuite-fail2.lua @@ -62,9 +62,6 @@ assert(false == pcall(DecodeJson, [[ [1 ]])) -- (converted to binary for safety) assert(false == pcall(DecodeJson, [[ \x5b\x5c\x75\x30\x30\x30\x41\x22\x22\x5d ]])) --- https://github.com/nst/JSONTestSuite/tree/d64aefb55228d9584d3e5b2433f720ea8fd00c82/test_parsing/n_structure_trailing_#.json -assert(false == pcall(DecodeJson, [[ {"a":"b"}#{} ]])) - -- https://github.com/nst/JSONTestSuite/tree/d64aefb55228d9584d3e5b2433f720ea8fd00c82/test_parsing/n_structure_single_star.json assert(false == pcall(DecodeJson, [[ * ]])) @@ -111,28 +108,16 @@ assert(false == pcall(DecodeJson, [[ [, ]])) -- https://github.com/nst/JSONTestSuite/tree/d64aefb55228d9584d3e5b2433f720ea8fd00c82/test_parsing/n_structure_open_array_apostrophe.json assert(false == pcall(DecodeJson, [[ [' ]])) --- https://github.com/nst/JSONTestSuite/tree/d64aefb55228d9584d3e5b2433f720ea8fd00c82/test_parsing/n_structure_object_with_trailing_garbage.json -assert(false == pcall(DecodeJson, [[ {"a": true} "x" ]])) - -- https://github.com/nst/JSONTestSuite/tree/d64aefb55228d9584d3e5b2433f720ea8fd00c82/test_parsing/n_structure_object_with_comment.json assert(false == pcall(DecodeJson, [[ {"a":/*comment*/"b"} ]])) -- https://github.com/nst/JSONTestSuite/tree/d64aefb55228d9584d3e5b2433f720ea8fd00c82/test_parsing/n_structure_object_unclosed_no_value.json assert(false == pcall(DecodeJson, [[ {"": ]])) --- https://github.com/nst/JSONTestSuite/tree/d64aefb55228d9584d3e5b2433f720ea8fd00c82/test_parsing/n_structure_object_followed_by_closing_object.json -assert(false == pcall(DecodeJson, [[ {}} ]])) - --- https://github.com/nst/JSONTestSuite/tree/d64aefb55228d9584d3e5b2433f720ea8fd00c82/test_parsing/n_structure_number_with_trailing_garbage.json -assert(false == pcall(DecodeJson, [[ 2@ ]])) - -- https://github.com/nst/JSONTestSuite/tree/d64aefb55228d9584d3e5b2433f720ea8fd00c82/test_parsing/n_structure_null-byte-outside-string.json -- (converted to binary for safety) assert(false == pcall(DecodeJson, [[ \x5b\x0\x5d ]])) --- https://github.com/nst/JSONTestSuite/tree/d64aefb55228d9584d3e5b2433f720ea8fd00c82/test_parsing/n_structure_no_data.json -assert(false == pcall(DecodeJson, [[ ]])) - -- https://github.com/nst/JSONTestSuite/tree/d64aefb55228d9584d3e5b2433f720ea8fd00c82/test_parsing/n_structure_lone-open-bracket.json assert(false == pcall(DecodeJson, [[ [ ]])) @@ -143,18 +128,9 @@ assert(false == pcall(DecodeJson, [[ \xe5 ]])) -- https://github.com/nst/JSONTestSuite/tree/d64aefb55228d9584d3e5b2433f720ea8fd00c82/test_parsing/n_structure_incomplete_UTF8_BOM.json assert(false == pcall(DecodeJson, [[ ï»{} ]])) --- https://github.com/nst/JSONTestSuite/tree/d64aefb55228d9584d3e5b2433f720ea8fd00c82/test_parsing/n_structure_end_array.json -assert(false == pcall(DecodeJson, [[ ] ]])) - --- https://github.com/nst/JSONTestSuite/tree/d64aefb55228d9584d3e5b2433f720ea8fd00c82/test_parsing/n_structure_double_array.json -assert(false == pcall(DecodeJson, [[ [][] ]])) - -- https://github.com/nst/JSONTestSuite/tree/d64aefb55228d9584d3e5b2433f720ea8fd00c82/test_parsing/n_structure_comma_instead_of_closing_brace.json assert(false == pcall(DecodeJson, [[ {"x": true, ]])) --- https://github.com/nst/JSONTestSuite/tree/d64aefb55228d9584d3e5b2433f720ea8fd00c82/test_parsing/n_structure_close_unopened_array.json -assert(false == pcall(DecodeJson, [[ 1] ]])) - -- https://github.com/nst/JSONTestSuite/tree/d64aefb55228d9584d3e5b2433f720ea8fd00c82/test_parsing/n_structure_capitalized_True.json assert(false == pcall(DecodeJson, [[ [True] ]])) @@ -166,14 +142,6 @@ assert(false == pcall(DecodeJson, [[ \x61\xc3\xa5 ]])) -- (converted to binary for safety) assert(false == pcall(DecodeJson, [[ \x5b\x22\x61\x73\x64\x5d ]])) --- https://github.com/nst/JSONTestSuite/tree/d64aefb55228d9584d3e5b2433f720ea8fd00c82/test_parsing/n_structure_array_with_extra_array_close.json --- (added spaces between [[ and ]] so lua doesn't get confused) -assert(false == pcall(DecodeJson, [[ -[ 1] ] ]])) - --- https://github.com/nst/JSONTestSuite/tree/d64aefb55228d9584d3e5b2433f720ea8fd00c82/test_parsing/n_structure_array_trailing_garbage.json -assert(false == pcall(DecodeJson, [[ [1]x ]])) - -- https://github.com/nst/JSONTestSuite/tree/d64aefb55228d9584d3e5b2433f720ea8fd00c82/test_parsing/n_structure_angle_bracket_null.json assert(false == pcall(DecodeJson, [[ [] ]])) diff --git a/test/tool/net/samples/JSONTestSuite-fail4.lua b/test/tool/net/samples/JSONTestSuite-fail4.lua index 4d21b42bb..b219d3504 100644 --- a/test/tool/net/samples/JSONTestSuite-fail4.lua +++ b/test/tool/net/samples/JSONTestSuite-fail4.lua @@ -146,12 +146,6 @@ assert(false == pcall(DecodeJson, [[ \x5b\x22\x5c\x75\x44\x38\x30\x30\x5c\x75\x2 -- (converted to binary for safety) assert(false == pcall(DecodeJson, [[ \x5b\x22\x5c\x75\x44\x38\x30\x30\x5c\x22\x5d ]])) --- https://github.com/nst/JSONTestSuite/tree/d64aefb55228d9584d3e5b2433f720ea8fd00c82/test_parsing/n_single_space.json -assert(false == pcall(DecodeJson, [[ ]])) - --- https://github.com/nst/JSONTestSuite/tree/d64aefb55228d9584d3e5b2433f720ea8fd00c82/test_parsing/n_object_with_trailing_garbage.json -assert(false == pcall(DecodeJson, [[ {"a":"b"}# ]])) - -- https://github.com/nst/JSONTestSuite/tree/d64aefb55228d9584d3e5b2433f720ea8fd00c82/test_parsing/n_object_with_single_string.json -- (converted to binary for safety) assert(false == pcall(DecodeJson, [[ \x7b\x20\x22\x66\x6f\x6f\x22\x20\x3a\x20\x22\x62\x61\x72\x22\x2c\x20\x22\x61\x22\x20\x7d ]])) @@ -162,30 +156,9 @@ assert(false == pcall(DecodeJson, [[ {"a":"a ]])) -- https://github.com/nst/JSONTestSuite/tree/d64aefb55228d9584d3e5b2433f720ea8fd00c82/test_parsing/n_object_unquoted_key.json assert(false == pcall(DecodeJson, [[ {a: "b"} ]])) --- https://github.com/nst/JSONTestSuite/tree/d64aefb55228d9584d3e5b2433f720ea8fd00c82/test_parsing/n_object_two_commas_in_a_row.json -assert(false == pcall(DecodeJson, [[ {"a":"b",,"c":"d"} ]])) - --- https://github.com/nst/JSONTestSuite/tree/d64aefb55228d9584d3e5b2433f720ea8fd00c82/test_parsing/n_object_trailing_comment_slash_open_incomplete.json -assert(false == pcall(DecodeJson, [[ {"a":"b"}/ ]])) - --- https://github.com/nst/JSONTestSuite/tree/d64aefb55228d9584d3e5b2433f720ea8fd00c82/test_parsing/n_object_trailing_comment_slash_open.json -assert(false == pcall(DecodeJson, [[ {"a":"b"}// ]])) - --- https://github.com/nst/JSONTestSuite/tree/d64aefb55228d9584d3e5b2433f720ea8fd00c82/test_parsing/n_object_trailing_comment_open.json -assert(false == pcall(DecodeJson, [[ {"a":"b"}/**// ]])) - --- https://github.com/nst/JSONTestSuite/tree/d64aefb55228d9584d3e5b2433f720ea8fd00c82/test_parsing/n_object_trailing_comment.json -assert(false == pcall(DecodeJson, [[ {"a":"b"}/**/ ]])) - --- https://github.com/nst/JSONTestSuite/tree/d64aefb55228d9584d3e5b2433f720ea8fd00c82/test_parsing/n_object_trailing_comma.json -assert(false == pcall(DecodeJson, [[ {"id":0,} ]])) - -- https://github.com/nst/JSONTestSuite/tree/d64aefb55228d9584d3e5b2433f720ea8fd00c82/test_parsing/n_object_single_quote.json assert(false == pcall(DecodeJson, [[ {'a':0} ]])) --- https://github.com/nst/JSONTestSuite/tree/d64aefb55228d9584d3e5b2433f720ea8fd00c82/test_parsing/n_object_several_trailing_commas.json -assert(false == pcall(DecodeJson, [[ {"id":0,,,,,} ]])) - -- https://github.com/nst/JSONTestSuite/tree/d64aefb55228d9584d3e5b2433f720ea8fd00c82/test_parsing/n_object_repeated_null_null.json assert(false == pcall(DecodeJson, [[ {null:null,null:null} ]])) diff --git a/test/tool/net/samples/JSONTestSuite-lenient.lua b/test/tool/net/samples/JSONTestSuite-lenient.lua new file mode 100644 index 0000000000000000000000000000000000000000..95d4f0bf4d2cfd456fbffa0efdb95e9f6193a8a1 GIT binary patch literal 10336 zcmd5>U2ogQ61~s<6$AF6c1!EaPMd4s0#~u(vo*< zwBBVG-R?Tln|#>`)V7;sy8D-X_+cAq3V%2kam{`=MI^YBc*S`N<7&Q?DT zdQ!Yzg}q+zdcdOjbK}lw90fATj5c1nRJ+GCT5mKR2PZV>^?&#i%)_&{GTla57O8}y zj5acr%ST$LBGEFmX_ZPzYDK|Dq-$xDRwR-~+Q~G-18S*7ltjsz1O-sYGO<~2ASqKT zy%(v({*XkLsUQ*%NudhztxUAgta25_GNWU?kz~!vC#(~rCzK*)fl&g1k`BMp9vrG% zQwoC9C}1%*HU)7WGLpm3aRep{CH%PIB4c?lAZ|n(fdILnpfC_m5O7vXBz{Rgb^E_U9d&`nPY=ks*lpxRd_y88nBH6j7tof!qw$Z z*+#@MEoI3cw1aIdvBZOEFg9Oi8V4d0G3``p6#v=e&NGl}hi22O`MaU#kUOJWZ~BWn zazk@&za3=>aj%k=638lSav6u z~be4*L(a6D#hEN*xQGdu=L zm($z#p8NKCPS?}%$id#!jIP)?JQ=?u|{O;mzelS-_-s*AB0; z)*=31&fV#R?YTrk@$l7#x!(Nw>38nTv1#bJGiK(>o8A~pnO!^t9gu@ZCr%-VnKxuT zI|y5tygOKbKtv;FIEFZQYjUvlu)pv!TaN>oNz#Zx3Pgqw;85SCauq$`6mbwz;@gA( z;@$BFP8Xq)S@JDMt~u76NQ%JOB0=EfeH3vN^7cLAH8){j>VWvu2&+DHG(k+@-#!FA-B*@q#1`yf!9DiVil`YZD}Q<_`DP6!Yoxu(p`;& z*sYqMyUdSYLg*$wBZ;M-?L;6uOvw=vqfGU2625f*o`)Gu&G_v^Bywo{(EUxfwihZkV~?z^u7 z{>zZJeR4z%*imR*^z1eQH{xbBJkA4s7r|MpLYRMT% zzFo@nZ`Krp|F*+_qWnItYFlrjl@k*4CY@@cql2WY6!O3Rv97x#;n;Bu%*KTr75 zNAT67xZe_JgR%%W`G6w6fNj!7SvI2mITm4vKFxF@83q7)FJ;2r22X45?=gNLv_;Py z+ghT{Q^^X0lklWM({i*RHlG@8UOr{bf`S(}FpK{ELm3}mw2J-W2IjT@|7})gelwdx zw$J32r;Msz@k!iN3vj0)DVAOyk%BVpFW4!OFB0p|4hGBI}X;fXP;p$8j5U zF98|Dle~IcxIjgNDQlYRO`~b*^I{+d(_F~>DpOVY;#&0jgEkPSm`0nViqW&bN`;v_ zV+q3@T^)SC(+2iLu5q$4NzeexjGOsRJ=#xO;(Z$>c~(r!{C;(!PtE<)+~BM{*Mp8c zs}7QPw{aez_p~0&)3$JaUk~T^t>EnYy-h@P9g!j#UNhw}{Bsiy)Y3&cr{?%k1R@CezSacz% zc#C;j%`w`dZ`+Mh{TJW{aAlr>w*|O|wxVX$h=$H4%W45IzxeY_F;Jb^)3$KdJOOPS zfG9~Ylq=6}`O2(dwvp+;*@DjDon{9Fg|)>{q^653s|_cWPXX7b z<>26DK0-_T?4@RgG+%(Od8BYpHQUJ+U=2#2FWBO)t)5QpW=oha;I1^Xl^MrY$BTQ) YZoY!)