summaryrefslogtreecommitdiffstats
path: root/js/src/tests/ecma_6/RegExp/unicode-class-range.js
diff options
context:
space:
mode:
authorMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
committerMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
commit5f8de423f190bbb79a62f804151bc24824fa32d8 (patch)
tree10027f336435511475e392454359edea8e25895d /js/src/tests/ecma_6/RegExp/unicode-class-range.js
parent49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff)
downloadUXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip
Add m-esr52 at 52.6.0
Diffstat (limited to 'js/src/tests/ecma_6/RegExp/unicode-class-range.js')
-rw-r--r--js/src/tests/ecma_6/RegExp/unicode-class-range.js28
1 files changed, 28 insertions, 0 deletions
diff --git a/js/src/tests/ecma_6/RegExp/unicode-class-range.js b/js/src/tests/ecma_6/RegExp/unicode-class-range.js
new file mode 100644
index 000000000..5bb757560
--- /dev/null
+++ b/js/src/tests/ecma_6/RegExp/unicode-class-range.js
@@ -0,0 +1,28 @@
+var BUGNUMBER = 1135377;
+var summary = "Implement RegExp unicode flag -- disallow range with CharacterClassEscape.";
+
+print(BUGNUMBER + ": " + summary);
+
+assertThrowsInstanceOf(() => eval(`/[\\w-\\uFFFF]/u`), SyntaxError);
+assertThrowsInstanceOf(() => eval(`/[\\W-\\uFFFF]/u`), SyntaxError);
+assertThrowsInstanceOf(() => eval(`/[\\d-\\uFFFF]/u`), SyntaxError);
+assertThrowsInstanceOf(() => eval(`/[\\D-\\uFFFF]/u`), SyntaxError);
+assertThrowsInstanceOf(() => eval(`/[\\s-\\uFFFF]/u`), SyntaxError);
+assertThrowsInstanceOf(() => eval(`/[\\S-\\uFFFF]/u`), SyntaxError);
+
+assertThrowsInstanceOf(() => eval(`/[\\uFFFF-\\w]/u`), SyntaxError);
+assertThrowsInstanceOf(() => eval(`/[\\uFFFF-\\W]/u`), SyntaxError);
+assertThrowsInstanceOf(() => eval(`/[\\uFFFF-\\d]/u`), SyntaxError);
+assertThrowsInstanceOf(() => eval(`/[\\uFFFF-\\D]/u`), SyntaxError);
+assertThrowsInstanceOf(() => eval(`/[\\uFFFF-\\s]/u`), SyntaxError);
+assertThrowsInstanceOf(() => eval(`/[\\uFFFF-\\S]/u`), SyntaxError);
+
+assertThrowsInstanceOf(() => eval(`/[\\w-\\w]/u`), SyntaxError);
+assertThrowsInstanceOf(() => eval(`/[\\W-\\W]/u`), SyntaxError);
+assertThrowsInstanceOf(() => eval(`/[\\d-\\d]/u`), SyntaxError);
+assertThrowsInstanceOf(() => eval(`/[\\D-\\D]/u`), SyntaxError);
+assertThrowsInstanceOf(() => eval(`/[\\s-\\s]/u`), SyntaxError);
+assertThrowsInstanceOf(() => eval(`/[\\S-\\S]/u`), SyntaxError);
+
+if (typeof reportCompare === "function")
+ reportCompare(true, true);