summaryrefslogtreecommitdiffstats
path: root/js/src/tests
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@gmail.com>2018-03-18 17:57:11 +0100
committerwolfbeast <mcwerewolf@gmail.com>2018-03-18 17:58:37 +0100
commitb2331d76221b67bffb5cb5a2344c8b150a305dc7 (patch)
tree5d9cae4cdfc502b568f436fd66d77e0b16476395 /js/src/tests
parent122938a4398ae8db07060dca3561ff46f93b5925 (diff)
parent427e7346629c76a1676a3f92320c3d2575d01b85 (diff)
downloadUXP-b2331d76221b67bffb5cb5a2344c8b150a305dc7.tar
UXP-b2331d76221b67bffb5cb5a2344c8b150a305dc7.tar.gz
UXP-b2331d76221b67bffb5cb5a2344c8b150a305dc7.tar.lz
UXP-b2331d76221b67bffb5cb5a2344c8b150a305dc7.tar.xz
UXP-b2331d76221b67bffb5cb5a2344c8b150a305dc7.zip
Correctly tokenize valid JS names when using code points outside of BMP range.
This resolves #72. Merged remote-tracking branch 'janek/js_variable_unicode_1'
Diffstat (limited to 'js/src/tests')
-rw-r--r--js/src/tests/ecma_6/Syntax/identifiers-with-extended-unicode-escape.js18
1 files changed, 2 insertions, 16 deletions
diff --git a/js/src/tests/ecma_6/Syntax/identifiers-with-extended-unicode-escape.js b/js/src/tests/ecma_6/Syntax/identifiers-with-extended-unicode-escape.js
index 8e0a05fb5..e4b5f4602 100644
--- a/js/src/tests/ecma_6/Syntax/identifiers-with-extended-unicode-escape.js
+++ b/js/src/tests/ecma_6/Syntax/identifiers-with-extended-unicode-escape.js
@@ -98,7 +98,7 @@ const otherIdContinue = [
0x19DA, // NEW TAI LUE THAM DIGIT ONE, Gc=No
];
-for (let ident of [...idStart, ...otherIdStart]) {
+for (let ident of [...idStart, ...otherIdStart, ...idStartSupplemental]) {
for (let count of leadingZeros) {
let zeros = "0".repeat(count);
eval(`
@@ -108,20 +108,13 @@ for (let ident of [...idStart, ...otherIdStart]) {
}
}
-// Move this to the loop above when Bug 1197230 is fixed.
-for (let ident of [...idStartSupplemental]) {
- for (let zeros of leadingZeros) {
- assertThrowsInstanceOf(() => eval(`\\u{${zeros}${ident.toString(16)}}`), SyntaxError);
- }
-}
-
for (let ident of [...idContinue, ...idContinueSupplemental, ...otherIdContinue]) {
for (let zeros of leadingZeros) {
assertThrowsInstanceOf(() => eval(`\\u{${zeros}${ident.toString(16)}}`), SyntaxError);
}
}
-for (let ident of [...idStart, ...otherIdStart, ...idContinue, ...otherIdContinue]) {
+for (let ident of [...idStart, ...otherIdStart, ...idContinue, ...otherIdContinue, ...idStartSupplemental, ...idContinueSupplemental]) {
for (let zeros of leadingZeros) {
eval(`
let A\\u{${zeros}${ident.toString(16)}} = 123;
@@ -130,13 +123,6 @@ for (let ident of [...idStart, ...otherIdStart, ...idContinue, ...otherIdContinu
}
}
-// Move this to the loop above when Bug 1197230 is fixed.
-for (let ident of [...idStartSupplemental, ...idContinueSupplemental]) {
- for (let zeros of leadingZeros) {
- assertThrowsInstanceOf(() => eval(`\\u{${zeros}${ident.toString(16)}}`), SyntaxError);
- }
-}
-
const notIdentifiers = [
0x0000, // NULL, Gc=Cc