summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/jit-test')
-rw-r--r--js/src/jit-test/tests/latin1/json.js11
1 files changed, 4 insertions, 7 deletions
diff --git a/js/src/jit-test/tests/latin1/json.js b/js/src/jit-test/tests/latin1/json.js
index 16559890d..ab7610cd5 100644
--- a/js/src/jit-test/tests/latin1/json.js
+++ b/js/src/jit-test/tests/latin1/json.js
@@ -55,13 +55,10 @@ function testEvalHackNotJSON() {
arr = eval("[]; var z; [1, 2, 3, \"abc\u1200\"]");
assertEq(JSON.stringify(arr), '[1,2,3,"abc\u1200"]');
- try {
- eval("[1, 2, 3, \"abc\u2028\"]");
- throw new Error("U+2028 shouldn't eval");
- } catch (e) {
- assertEq(e instanceof SyntaxError, true,
- "should have thrown a SyntaxError, instead got " + e);
- }
+ // JSON superset
+ var arr = eval("[1, 2, 3, \"abc\u2028\"]");
+ assertEq(arr.length, 4);
+ assertEq(arr[3], "abc\u2028");
}
testEvalHackNotJSON();