summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorFabrice Bellard <fabrice@bellard.org>2025-05-19 17:23:25 +0200
committerFabrice Bellard <fabrice@bellard.org>2025-05-19 17:23:25 +0200
commit9bce51eefdbf38d44aa02cf34af81aafb7b7db33 (patch)
treefe6670183959fe3b6ebbe9269316514948d5c121 /tests
parentaaa9cea6a8831d1cad7ad2e6ea157f19116e20a2 (diff)
downloadquickjs-9bce51eefdbf38d44aa02cf34af81aafb7b7db33.tar.gz
quickjs-9bce51eefdbf38d44aa02cf34af81aafb7b7db33.zip
improved JSON parser conformity (chqrlie) (#250)
Diffstat (limited to 'tests')
-rw-r--r--tests/test_builtin.js2
-rw-r--r--tests/test_std.js2
2 files changed, 2 insertions, 2 deletions
diff --git a/tests/test_builtin.js b/tests/test_builtin.js
index ff376ec..a541c19 100644
--- a/tests/test_builtin.js
+++ b/tests/test_builtin.js
@@ -596,7 +596,7 @@ function test_json()
]
]`);
- assert_json_error('\n" @\\x"');
+ assert_json_error('\n" \\@x"');
assert_json_error('\n{ "a": @x }"');
}
diff --git a/tests/test_std.js b/tests/test_std.js
index bb942d6..df02f92 100644
--- a/tests/test_std.js
+++ b/tests/test_std.js
@@ -134,7 +134,7 @@ function test_ext_json()
"y":true, // also a comment
z2:null, // unquoted property names
"a":[+1,0o10,0xa0,], // plus prefix, octal, hexadecimal
- "s":"str",} // trailing comma in objects and arrays
+ "s":'str',} // trailing comma in objects and arrays, single quoted string
`;
obj = std.parseExtJSON(input);
assert(JSON.stringify(obj), expected);