summaryrefslogtreecommitdiffstats
path: root/js/src/tests/ecma_6
diff options
context:
space:
mode:
authorjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-03-18 14:55:49 +0100
committerjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-03-18 14:55:49 +0100
commit427e7346629c76a1676a3f92320c3d2575d01b85 (patch)
tree661743558731b0b2ca20b50528354d2441f0d684 /js/src/tests/ecma_6
parenta24511ca8e19afe4d19008ba903e1edab0af3223 (diff)
downloadUXP-427e7346629c76a1676a3f92320c3d2575d01b85.tar
UXP-427e7346629c76a1676a3f92320c3d2575d01b85.tar.gz
UXP-427e7346629c76a1676a3f92320c3d2575d01b85.tar.lz
UXP-427e7346629c76a1676a3f92320c3d2575d01b85.tar.xz
UXP-427e7346629c76a1676a3f92320c3d2575d01b85.zip
Correctly tokenize valid JS names when using Unicode mathematical alphanumeric symbols as variable name
Issue https://github.com/MoonchildProductions/Pale-Moon/issues/1647
Diffstat (limited to 'js/src/tests/ecma_6')
-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