summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/built-ins/RegExp/CharacterClassEscapes
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:47:55 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:47:55 +0000
commit26a029d407be480d791972afb5975cf62c9360a6 (patch)
treef435a8308119effd964b339f76abb83a57c29483 /js/src/tests/test262/built-ins/RegExp/CharacterClassEscapes
parentInitial commit. (diff)
downloadfirefox-26a029d407be480d791972afb5975cf62c9360a6.tar.xz
firefox-26a029d407be480d791972afb5975cf62c9360a6.zip
Adding upstream version 124.0.1.upstream/124.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'js/src/tests/test262/built-ins/RegExp/CharacterClassEscapes')
-rw-r--r--js/src/tests/test262/built-ins/RegExp/CharacterClassEscapes/browser.js0
-rw-r--r--js/src/tests/test262/built-ins/RegExp/CharacterClassEscapes/character-class-digit-class-escape-flags-u.js66
-rw-r--r--js/src/tests/test262/built-ins/RegExp/CharacterClassEscapes/character-class-digit-class-escape-plus-quantifier-flags-u.js66
-rw-r--r--js/src/tests/test262/built-ins/RegExp/CharacterClassEscapes/character-class-digit-class-escape-plus-quantifier.js66
-rw-r--r--js/src/tests/test262/built-ins/RegExp/CharacterClassEscapes/character-class-digit-class-escape.js66
-rw-r--r--js/src/tests/test262/built-ins/RegExp/CharacterClassEscapes/character-class-non-digit-class-escape-flags-u.js67
-rw-r--r--js/src/tests/test262/built-ins/RegExp/CharacterClassEscapes/character-class-non-digit-class-escape-plus-quantifier-flags-u.js67
-rw-r--r--js/src/tests/test262/built-ins/RegExp/CharacterClassEscapes/character-class-non-digit-class-escape-plus-quantifier.js67
-rw-r--r--js/src/tests/test262/built-ins/RegExp/CharacterClassEscapes/character-class-non-digit-class-escape.js67
-rw-r--r--js/src/tests/test262/built-ins/RegExp/CharacterClassEscapes/character-class-non-whitespace-class-escape-flags-u.js78
-rw-r--r--js/src/tests/test262/built-ins/RegExp/CharacterClassEscapes/character-class-non-whitespace-class-escape-plus-quantifier-flags-u.js78
-rw-r--r--js/src/tests/test262/built-ins/RegExp/CharacterClassEscapes/character-class-non-whitespace-class-escape-plus-quantifier.js78
-rw-r--r--js/src/tests/test262/built-ins/RegExp/CharacterClassEscapes/character-class-non-whitespace-class-escape.js78
-rw-r--r--js/src/tests/test262/built-ins/RegExp/CharacterClassEscapes/character-class-non-word-class-escape-flags-u.js71
-rw-r--r--js/src/tests/test262/built-ins/RegExp/CharacterClassEscapes/character-class-non-word-class-escape-plus-quantifier-flags-u.js71
-rw-r--r--js/src/tests/test262/built-ins/RegExp/CharacterClassEscapes/character-class-non-word-class-escape-plus-quantifier.js71
-rw-r--r--js/src/tests/test262/built-ins/RegExp/CharacterClassEscapes/character-class-non-word-class-escape.js71
-rw-r--r--js/src/tests/test262/built-ins/RegExp/CharacterClassEscapes/character-class-whitespace-class-escape-flags-u.js76
-rw-r--r--js/src/tests/test262/built-ins/RegExp/CharacterClassEscapes/character-class-whitespace-class-escape-plus-quantifier-flags-u.js76
-rw-r--r--js/src/tests/test262/built-ins/RegExp/CharacterClassEscapes/character-class-whitespace-class-escape-plus-quantifier.js76
-rw-r--r--js/src/tests/test262/built-ins/RegExp/CharacterClassEscapes/character-class-whitespace-class-escape.js76
-rw-r--r--js/src/tests/test262/built-ins/RegExp/CharacterClassEscapes/character-class-word-class-escape-flags-u.js68
-rw-r--r--js/src/tests/test262/built-ins/RegExp/CharacterClassEscapes/character-class-word-class-escape-plus-quantifier-flags-u.js68
-rw-r--r--js/src/tests/test262/built-ins/RegExp/CharacterClassEscapes/character-class-word-class-escape-plus-quantifier.js68
-rw-r--r--js/src/tests/test262/built-ins/RegExp/CharacterClassEscapes/character-class-word-class-escape.js68
-rw-r--r--js/src/tests/test262/built-ins/RegExp/CharacterClassEscapes/shell.js115
26 files changed, 1819 insertions, 0 deletions
diff --git a/js/src/tests/test262/built-ins/RegExp/CharacterClassEscapes/browser.js b/js/src/tests/test262/built-ins/RegExp/CharacterClassEscapes/browser.js
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/js/src/tests/test262/built-ins/RegExp/CharacterClassEscapes/browser.js
diff --git a/js/src/tests/test262/built-ins/RegExp/CharacterClassEscapes/character-class-digit-class-escape-flags-u.js b/js/src/tests/test262/built-ins/RegExp/CharacterClassEscapes/character-class-digit-class-escape-flags-u.js
new file mode 100644
index 0000000000..20d13f9283
--- /dev/null
+++ b/js/src/tests/test262/built-ins/RegExp/CharacterClassEscapes/character-class-digit-class-escape-flags-u.js
@@ -0,0 +1,66 @@
+// Copyright (C) 2018 Leo Balter. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+esid: prod-CharacterClassEscape
+description: >
+ Compare range for digit class escape \d with flags ug
+info: |
+ This is a generated test. Please check out
+ https://github.com/bocoup/test262-regexp-generator
+ for any changes.
+
+ CharacterClassEscape[U] ::
+ d
+ D
+ s
+ S
+ w
+ W
+
+ 21.2.2.12 CharacterClassEscape
+
+ The production CharacterClassEscape :: d evaluates as follows:
+ Return the ten-element set of characters containing the characters 0 through 9 inclusive.
+ The production CharacterClassEscape :: D evaluates as follows:
+ Return the set of all characters not included in the set returned by CharacterClassEscape :: d.
+ The production CharacterClassEscape :: s evaluates as follows:
+ Return the set of characters containing the characters that are on the right-hand side of
+ the WhiteSpace or LineTerminator productions.
+ The production CharacterClassEscape :: S evaluates as follows:
+ Return the set of all characters not included in the set returned by CharacterClassEscape :: s.
+ The production CharacterClassEscape :: w evaluates as follows:
+ Return the set of all characters returned by WordCharacters().
+ The production CharacterClassEscape :: W evaluates as follows:
+ Return the set of all characters not included in the set returned by CharacterClassEscape :: w.
+features: [String.fromCodePoint]
+includes: [regExpUtils.js]
+---*/
+
+const str = buildString({
+ loneCodePoints: [],
+ ranges: [
+ [0x0030, 0x0039],
+ ],
+});
+
+const re = /\d/ug;
+
+const errors = [];
+
+if (!re.test(str)) {
+ // Error, let's find out where
+ for (const char of str) {
+ if (!re.test(char)) {
+ errors.push('0x' + char.codePointAt(0).toString(16));
+ }
+ }
+}
+
+assert.sameValue(
+ errors.length,
+ 0,
+ 'Expected matching code points, but received: ' + errors.join(',')
+);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/RegExp/CharacterClassEscapes/character-class-digit-class-escape-plus-quantifier-flags-u.js b/js/src/tests/test262/built-ins/RegExp/CharacterClassEscapes/character-class-digit-class-escape-plus-quantifier-flags-u.js
new file mode 100644
index 0000000000..54cb356792
--- /dev/null
+++ b/js/src/tests/test262/built-ins/RegExp/CharacterClassEscapes/character-class-digit-class-escape-plus-quantifier-flags-u.js
@@ -0,0 +1,66 @@
+// Copyright (C) 2018 Leo Balter. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+esid: prod-CharacterClassEscape
+description: >
+ Compare range for digit class escape \d+ with flags ug
+info: |
+ This is a generated test. Please check out
+ https://github.com/bocoup/test262-regexp-generator
+ for any changes.
+
+ CharacterClassEscape[U] ::
+ d
+ D
+ s
+ S
+ w
+ W
+
+ 21.2.2.12 CharacterClassEscape
+
+ The production CharacterClassEscape :: d evaluates as follows:
+ Return the ten-element set of characters containing the characters 0 through 9 inclusive.
+ The production CharacterClassEscape :: D evaluates as follows:
+ Return the set of all characters not included in the set returned by CharacterClassEscape :: d.
+ The production CharacterClassEscape :: s evaluates as follows:
+ Return the set of characters containing the characters that are on the right-hand side of
+ the WhiteSpace or LineTerminator productions.
+ The production CharacterClassEscape :: S evaluates as follows:
+ Return the set of all characters not included in the set returned by CharacterClassEscape :: s.
+ The production CharacterClassEscape :: w evaluates as follows:
+ Return the set of all characters returned by WordCharacters().
+ The production CharacterClassEscape :: W evaluates as follows:
+ Return the set of all characters not included in the set returned by CharacterClassEscape :: w.
+features: [String.fromCodePoint]
+includes: [regExpUtils.js]
+---*/
+
+const str = buildString({
+ loneCodePoints: [],
+ ranges: [
+ [0x0030, 0x0039],
+ ],
+});
+
+const re = /\d+/ug;
+
+const errors = [];
+
+if (!re.test(str)) {
+ // Error, let's find out where
+ for (const char of str) {
+ if (!re.test(char)) {
+ errors.push('0x' + char.codePointAt(0).toString(16));
+ }
+ }
+}
+
+assert.sameValue(
+ errors.length,
+ 0,
+ 'Expected matching code points, but received: ' + errors.join(',')
+);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/RegExp/CharacterClassEscapes/character-class-digit-class-escape-plus-quantifier.js b/js/src/tests/test262/built-ins/RegExp/CharacterClassEscapes/character-class-digit-class-escape-plus-quantifier.js
new file mode 100644
index 0000000000..aba4e33ca9
--- /dev/null
+++ b/js/src/tests/test262/built-ins/RegExp/CharacterClassEscapes/character-class-digit-class-escape-plus-quantifier.js
@@ -0,0 +1,66 @@
+// Copyright (C) 2018 Leo Balter. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+esid: prod-CharacterClassEscape
+description: >
+ Compare range for digit class escape \d+ with flags g
+info: |
+ This is a generated test. Please check out
+ https://github.com/bocoup/test262-regexp-generator
+ for any changes.
+
+ CharacterClassEscape[U] ::
+ d
+ D
+ s
+ S
+ w
+ W
+
+ 21.2.2.12 CharacterClassEscape
+
+ The production CharacterClassEscape :: d evaluates as follows:
+ Return the ten-element set of characters containing the characters 0 through 9 inclusive.
+ The production CharacterClassEscape :: D evaluates as follows:
+ Return the set of all characters not included in the set returned by CharacterClassEscape :: d.
+ The production CharacterClassEscape :: s evaluates as follows:
+ Return the set of characters containing the characters that are on the right-hand side of
+ the WhiteSpace or LineTerminator productions.
+ The production CharacterClassEscape :: S evaluates as follows:
+ Return the set of all characters not included in the set returned by CharacterClassEscape :: s.
+ The production CharacterClassEscape :: w evaluates as follows:
+ Return the set of all characters returned by WordCharacters().
+ The production CharacterClassEscape :: W evaluates as follows:
+ Return the set of all characters not included in the set returned by CharacterClassEscape :: w.
+features: [String.fromCodePoint]
+includes: [regExpUtils.js]
+---*/
+
+const str = buildString({
+ loneCodePoints: [],
+ ranges: [
+ [0x0030, 0x0039],
+ ],
+});
+
+const re = /\d+/g;
+
+const errors = [];
+
+if (!re.test(str)) {
+ // Error, let's find out where
+ for (const char of str) {
+ if (!re.test(char)) {
+ errors.push('0x' + char.codePointAt(0).toString(16));
+ }
+ }
+}
+
+assert.sameValue(
+ errors.length,
+ 0,
+ 'Expected matching code points, but received: ' + errors.join(',')
+);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/RegExp/CharacterClassEscapes/character-class-digit-class-escape.js b/js/src/tests/test262/built-ins/RegExp/CharacterClassEscapes/character-class-digit-class-escape.js
new file mode 100644
index 0000000000..e541572ba5
--- /dev/null
+++ b/js/src/tests/test262/built-ins/RegExp/CharacterClassEscapes/character-class-digit-class-escape.js
@@ -0,0 +1,66 @@
+// Copyright (C) 2018 Leo Balter. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+esid: prod-CharacterClassEscape
+description: >
+ Compare range for digit class escape \d with flags g
+info: |
+ This is a generated test. Please check out
+ https://github.com/bocoup/test262-regexp-generator
+ for any changes.
+
+ CharacterClassEscape[U] ::
+ d
+ D
+ s
+ S
+ w
+ W
+
+ 21.2.2.12 CharacterClassEscape
+
+ The production CharacterClassEscape :: d evaluates as follows:
+ Return the ten-element set of characters containing the characters 0 through 9 inclusive.
+ The production CharacterClassEscape :: D evaluates as follows:
+ Return the set of all characters not included in the set returned by CharacterClassEscape :: d.
+ The production CharacterClassEscape :: s evaluates as follows:
+ Return the set of characters containing the characters that are on the right-hand side of
+ the WhiteSpace or LineTerminator productions.
+ The production CharacterClassEscape :: S evaluates as follows:
+ Return the set of all characters not included in the set returned by CharacterClassEscape :: s.
+ The production CharacterClassEscape :: w evaluates as follows:
+ Return the set of all characters returned by WordCharacters().
+ The production CharacterClassEscape :: W evaluates as follows:
+ Return the set of all characters not included in the set returned by CharacterClassEscape :: w.
+features: [String.fromCodePoint]
+includes: [regExpUtils.js]
+---*/
+
+const str = buildString({
+ loneCodePoints: [],
+ ranges: [
+ [0x0030, 0x0039],
+ ],
+});
+
+const re = /\d/g;
+
+const errors = [];
+
+if (!re.test(str)) {
+ // Error, let's find out where
+ for (const char of str) {
+ if (!re.test(char)) {
+ errors.push('0x' + char.codePointAt(0).toString(16));
+ }
+ }
+}
+
+assert.sameValue(
+ errors.length,
+ 0,
+ 'Expected matching code points, but received: ' + errors.join(',')
+);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/RegExp/CharacterClassEscapes/character-class-non-digit-class-escape-flags-u.js b/js/src/tests/test262/built-ins/RegExp/CharacterClassEscapes/character-class-non-digit-class-escape-flags-u.js
new file mode 100644
index 0000000000..8ab26f2945
--- /dev/null
+++ b/js/src/tests/test262/built-ins/RegExp/CharacterClassEscapes/character-class-non-digit-class-escape-flags-u.js
@@ -0,0 +1,67 @@
+// Copyright (C) 2018 Leo Balter. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+esid: prod-CharacterClassEscape
+description: >
+ Compare range for non-digit class escape \D with flags ug
+info: |
+ This is a generated test. Please check out
+ https://github.com/bocoup/test262-regexp-generator
+ for any changes.
+
+ CharacterClassEscape[U] ::
+ d
+ D
+ s
+ S
+ w
+ W
+
+ 21.2.2.12 CharacterClassEscape
+
+ The production CharacterClassEscape :: d evaluates as follows:
+ Return the ten-element set of characters containing the characters 0 through 9 inclusive.
+ The production CharacterClassEscape :: D evaluates as follows:
+ Return the set of all characters not included in the set returned by CharacterClassEscape :: d.
+ The production CharacterClassEscape :: s evaluates as follows:
+ Return the set of characters containing the characters that are on the right-hand side of
+ the WhiteSpace or LineTerminator productions.
+ The production CharacterClassEscape :: S evaluates as follows:
+ Return the set of all characters not included in the set returned by CharacterClassEscape :: s.
+ The production CharacterClassEscape :: w evaluates as follows:
+ Return the set of all characters returned by WordCharacters().
+ The production CharacterClassEscape :: W evaluates as follows:
+ Return the set of all characters not included in the set returned by CharacterClassEscape :: w.
+features: [String.fromCodePoint]
+includes: [regExpUtils.js]
+---*/
+
+const str = buildString({
+ loneCodePoints: [],
+ ranges: [
+ [0x000000, 0x00002F],
+ [0x00003A, 0x10FFFF],
+ ],
+});
+
+const re = /\D/ug;
+
+const errors = [];
+
+if (!re.test(str)) {
+ // Error, let's find out where
+ for (const char of str) {
+ if (!re.test(char)) {
+ errors.push('0x' + char.codePointAt(0).toString(16));
+ }
+ }
+}
+
+assert.sameValue(
+ errors.length,
+ 0,
+ 'Expected matching code points, but received: ' + errors.join(',')
+);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/RegExp/CharacterClassEscapes/character-class-non-digit-class-escape-plus-quantifier-flags-u.js b/js/src/tests/test262/built-ins/RegExp/CharacterClassEscapes/character-class-non-digit-class-escape-plus-quantifier-flags-u.js
new file mode 100644
index 0000000000..411d71f4bf
--- /dev/null
+++ b/js/src/tests/test262/built-ins/RegExp/CharacterClassEscapes/character-class-non-digit-class-escape-plus-quantifier-flags-u.js
@@ -0,0 +1,67 @@
+// Copyright (C) 2018 Leo Balter. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+esid: prod-CharacterClassEscape
+description: >
+ Compare range for non-digit class escape \D+ with flags ug
+info: |
+ This is a generated test. Please check out
+ https://github.com/bocoup/test262-regexp-generator
+ for any changes.
+
+ CharacterClassEscape[U] ::
+ d
+ D
+ s
+ S
+ w
+ W
+
+ 21.2.2.12 CharacterClassEscape
+
+ The production CharacterClassEscape :: d evaluates as follows:
+ Return the ten-element set of characters containing the characters 0 through 9 inclusive.
+ The production CharacterClassEscape :: D evaluates as follows:
+ Return the set of all characters not included in the set returned by CharacterClassEscape :: d.
+ The production CharacterClassEscape :: s evaluates as follows:
+ Return the set of characters containing the characters that are on the right-hand side of
+ the WhiteSpace or LineTerminator productions.
+ The production CharacterClassEscape :: S evaluates as follows:
+ Return the set of all characters not included in the set returned by CharacterClassEscape :: s.
+ The production CharacterClassEscape :: w evaluates as follows:
+ Return the set of all characters returned by WordCharacters().
+ The production CharacterClassEscape :: W evaluates as follows:
+ Return the set of all characters not included in the set returned by CharacterClassEscape :: w.
+features: [String.fromCodePoint]
+includes: [regExpUtils.js]
+---*/
+
+const str = buildString({
+ loneCodePoints: [],
+ ranges: [
+ [0x000000, 0x00002F],
+ [0x00003A, 0x10FFFF],
+ ],
+});
+
+const re = /\D+/ug;
+
+const errors = [];
+
+if (!re.test(str)) {
+ // Error, let's find out where
+ for (const char of str) {
+ if (!re.test(char)) {
+ errors.push('0x' + char.codePointAt(0).toString(16));
+ }
+ }
+}
+
+assert.sameValue(
+ errors.length,
+ 0,
+ 'Expected matching code points, but received: ' + errors.join(',')
+);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/RegExp/CharacterClassEscapes/character-class-non-digit-class-escape-plus-quantifier.js b/js/src/tests/test262/built-ins/RegExp/CharacterClassEscapes/character-class-non-digit-class-escape-plus-quantifier.js
new file mode 100644
index 0000000000..f1a9cd7cc4
--- /dev/null
+++ b/js/src/tests/test262/built-ins/RegExp/CharacterClassEscapes/character-class-non-digit-class-escape-plus-quantifier.js
@@ -0,0 +1,67 @@
+// Copyright (C) 2018 Leo Balter. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+esid: prod-CharacterClassEscape
+description: >
+ Compare range for non-digit class escape \D+ with flags g
+info: |
+ This is a generated test. Please check out
+ https://github.com/bocoup/test262-regexp-generator
+ for any changes.
+
+ CharacterClassEscape[U] ::
+ d
+ D
+ s
+ S
+ w
+ W
+
+ 21.2.2.12 CharacterClassEscape
+
+ The production CharacterClassEscape :: d evaluates as follows:
+ Return the ten-element set of characters containing the characters 0 through 9 inclusive.
+ The production CharacterClassEscape :: D evaluates as follows:
+ Return the set of all characters not included in the set returned by CharacterClassEscape :: d.
+ The production CharacterClassEscape :: s evaluates as follows:
+ Return the set of characters containing the characters that are on the right-hand side of
+ the WhiteSpace or LineTerminator productions.
+ The production CharacterClassEscape :: S evaluates as follows:
+ Return the set of all characters not included in the set returned by CharacterClassEscape :: s.
+ The production CharacterClassEscape :: w evaluates as follows:
+ Return the set of all characters returned by WordCharacters().
+ The production CharacterClassEscape :: W evaluates as follows:
+ Return the set of all characters not included in the set returned by CharacterClassEscape :: w.
+features: [String.fromCodePoint]
+includes: [regExpUtils.js]
+---*/
+
+const str = buildString({
+ loneCodePoints: [],
+ ranges: [
+ [0x000000, 0x00002F],
+ [0x00003A, 0x00FFFF],
+ ],
+});
+
+const re = /\D+/g;
+
+const errors = [];
+
+if (!re.test(str)) {
+ // Error, let's find out where
+ for (const char of str) {
+ if (!re.test(char)) {
+ errors.push('0x' + char.codePointAt(0).toString(16));
+ }
+ }
+}
+
+assert.sameValue(
+ errors.length,
+ 0,
+ 'Expected matching code points, but received: ' + errors.join(',')
+);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/RegExp/CharacterClassEscapes/character-class-non-digit-class-escape.js b/js/src/tests/test262/built-ins/RegExp/CharacterClassEscapes/character-class-non-digit-class-escape.js
new file mode 100644
index 0000000000..0c1e438333
--- /dev/null
+++ b/js/src/tests/test262/built-ins/RegExp/CharacterClassEscapes/character-class-non-digit-class-escape.js
@@ -0,0 +1,67 @@
+// Copyright (C) 2018 Leo Balter. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+esid: prod-CharacterClassEscape
+description: >
+ Compare range for non-digit class escape \D with flags g
+info: |
+ This is a generated test. Please check out
+ https://github.com/bocoup/test262-regexp-generator
+ for any changes.
+
+ CharacterClassEscape[U] ::
+ d
+ D
+ s
+ S
+ w
+ W
+
+ 21.2.2.12 CharacterClassEscape
+
+ The production CharacterClassEscape :: d evaluates as follows:
+ Return the ten-element set of characters containing the characters 0 through 9 inclusive.
+ The production CharacterClassEscape :: D evaluates as follows:
+ Return the set of all characters not included in the set returned by CharacterClassEscape :: d.
+ The production CharacterClassEscape :: s evaluates as follows:
+ Return the set of characters containing the characters that are on the right-hand side of
+ the WhiteSpace or LineTerminator productions.
+ The production CharacterClassEscape :: S evaluates as follows:
+ Return the set of all characters not included in the set returned by CharacterClassEscape :: s.
+ The production CharacterClassEscape :: w evaluates as follows:
+ Return the set of all characters returned by WordCharacters().
+ The production CharacterClassEscape :: W evaluates as follows:
+ Return the set of all characters not included in the set returned by CharacterClassEscape :: w.
+features: [String.fromCodePoint]
+includes: [regExpUtils.js]
+---*/
+
+const str = buildString({
+ loneCodePoints: [],
+ ranges: [
+ [0x000000, 0x00002F],
+ [0x00003A, 0x00FFFF],
+ ],
+});
+
+const re = /\D/g;
+
+const errors = [];
+
+if (!re.test(str)) {
+ // Error, let's find out where
+ for (const char of str) {
+ if (!re.test(char)) {
+ errors.push('0x' + char.codePointAt(0).toString(16));
+ }
+ }
+}
+
+assert.sameValue(
+ errors.length,
+ 0,
+ 'Expected matching code points, but received: ' + errors.join(',')
+);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/RegExp/CharacterClassEscapes/character-class-non-whitespace-class-escape-flags-u.js b/js/src/tests/test262/built-ins/RegExp/CharacterClassEscapes/character-class-non-whitespace-class-escape-flags-u.js
new file mode 100644
index 0000000000..0a52b4f6a4
--- /dev/null
+++ b/js/src/tests/test262/built-ins/RegExp/CharacterClassEscapes/character-class-non-whitespace-class-escape-flags-u.js
@@ -0,0 +1,78 @@
+// Copyright (C) 2018 Leo Balter. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+esid: prod-CharacterClassEscape
+description: >
+ Compare range for non-whitespace class escape \S with flags ug
+info: |
+ This is a generated test. Please check out
+ https://github.com/bocoup/test262-regexp-generator
+ for any changes.
+
+ CharacterClassEscape[U] ::
+ d
+ D
+ s
+ S
+ w
+ W
+
+ 21.2.2.12 CharacterClassEscape
+
+ The production CharacterClassEscape :: d evaluates as follows:
+ Return the ten-element set of characters containing the characters 0 through 9 inclusive.
+ The production CharacterClassEscape :: D evaluates as follows:
+ Return the set of all characters not included in the set returned by CharacterClassEscape :: d.
+ The production CharacterClassEscape :: s evaluates as follows:
+ Return the set of characters containing the characters that are on the right-hand side of
+ the WhiteSpace or LineTerminator productions.
+ The production CharacterClassEscape :: S evaluates as follows:
+ Return the set of all characters not included in the set returned by CharacterClassEscape :: s.
+ The production CharacterClassEscape :: w evaluates as follows:
+ Return the set of all characters returned by WordCharacters().
+ The production CharacterClassEscape :: W evaluates as follows:
+ Return the set of all characters not included in the set returned by CharacterClassEscape :: w.
+features: [String.fromCodePoint]
+includes: [regExpUtils.js]
+---*/
+
+const str = buildString({
+ loneCodePoints: [],
+ ranges: [
+ [0x00DC00, 0x00DFFF],
+ [0x000000, 0x000008],
+ [0x00000E, 0x00001F],
+ [0x000021, 0x00009F],
+ [0x0000A1, 0x00167F],
+ [0x001681, 0x001FFF],
+ [0x00200B, 0x002027],
+ [0x00202A, 0x00202E],
+ [0x002030, 0x00205E],
+ [0x002060, 0x002FFF],
+ [0x003001, 0x00DBFF],
+ [0x00E000, 0x00FEFE],
+ [0x00FF00, 0x10FFFF],
+ ],
+});
+
+const re = /\S/ug;
+
+const errors = [];
+
+if (!re.test(str)) {
+ // Error, let's find out where
+ for (const char of str) {
+ if (!re.test(char)) {
+ errors.push('0x' + char.codePointAt(0).toString(16));
+ }
+ }
+}
+
+assert.sameValue(
+ errors.length,
+ 0,
+ 'Expected matching code points, but received: ' + errors.join(',')
+);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/RegExp/CharacterClassEscapes/character-class-non-whitespace-class-escape-plus-quantifier-flags-u.js b/js/src/tests/test262/built-ins/RegExp/CharacterClassEscapes/character-class-non-whitespace-class-escape-plus-quantifier-flags-u.js
new file mode 100644
index 0000000000..962888f885
--- /dev/null
+++ b/js/src/tests/test262/built-ins/RegExp/CharacterClassEscapes/character-class-non-whitespace-class-escape-plus-quantifier-flags-u.js
@@ -0,0 +1,78 @@
+// Copyright (C) 2018 Leo Balter. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+esid: prod-CharacterClassEscape
+description: >
+ Compare range for non-whitespace class escape \S+ with flags ug
+info: |
+ This is a generated test. Please check out
+ https://github.com/bocoup/test262-regexp-generator
+ for any changes.
+
+ CharacterClassEscape[U] ::
+ d
+ D
+ s
+ S
+ w
+ W
+
+ 21.2.2.12 CharacterClassEscape
+
+ The production CharacterClassEscape :: d evaluates as follows:
+ Return the ten-element set of characters containing the characters 0 through 9 inclusive.
+ The production CharacterClassEscape :: D evaluates as follows:
+ Return the set of all characters not included in the set returned by CharacterClassEscape :: d.
+ The production CharacterClassEscape :: s evaluates as follows:
+ Return the set of characters containing the characters that are on the right-hand side of
+ the WhiteSpace or LineTerminator productions.
+ The production CharacterClassEscape :: S evaluates as follows:
+ Return the set of all characters not included in the set returned by CharacterClassEscape :: s.
+ The production CharacterClassEscape :: w evaluates as follows:
+ Return the set of all characters returned by WordCharacters().
+ The production CharacterClassEscape :: W evaluates as follows:
+ Return the set of all characters not included in the set returned by CharacterClassEscape :: w.
+features: [String.fromCodePoint]
+includes: [regExpUtils.js]
+---*/
+
+const str = buildString({
+ loneCodePoints: [],
+ ranges: [
+ [0x00DC00, 0x00DFFF],
+ [0x000000, 0x000008],
+ [0x00000E, 0x00001F],
+ [0x000021, 0x00009F],
+ [0x0000A1, 0x00167F],
+ [0x001681, 0x001FFF],
+ [0x00200B, 0x002027],
+ [0x00202A, 0x00202E],
+ [0x002030, 0x00205E],
+ [0x002060, 0x002FFF],
+ [0x003001, 0x00DBFF],
+ [0x00E000, 0x00FEFE],
+ [0x00FF00, 0x10FFFF],
+ ],
+});
+
+const re = /\S+/ug;
+
+const errors = [];
+
+if (!re.test(str)) {
+ // Error, let's find out where
+ for (const char of str) {
+ if (!re.test(char)) {
+ errors.push('0x' + char.codePointAt(0).toString(16));
+ }
+ }
+}
+
+assert.sameValue(
+ errors.length,
+ 0,
+ 'Expected matching code points, but received: ' + errors.join(',')
+);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/RegExp/CharacterClassEscapes/character-class-non-whitespace-class-escape-plus-quantifier.js b/js/src/tests/test262/built-ins/RegExp/CharacterClassEscapes/character-class-non-whitespace-class-escape-plus-quantifier.js
new file mode 100644
index 0000000000..af82575ec4
--- /dev/null
+++ b/js/src/tests/test262/built-ins/RegExp/CharacterClassEscapes/character-class-non-whitespace-class-escape-plus-quantifier.js
@@ -0,0 +1,78 @@
+// Copyright (C) 2018 Leo Balter. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+esid: prod-CharacterClassEscape
+description: >
+ Compare range for non-whitespace class escape \S+ with flags g
+info: |
+ This is a generated test. Please check out
+ https://github.com/bocoup/test262-regexp-generator
+ for any changes.
+
+ CharacterClassEscape[U] ::
+ d
+ D
+ s
+ S
+ w
+ W
+
+ 21.2.2.12 CharacterClassEscape
+
+ The production CharacterClassEscape :: d evaluates as follows:
+ Return the ten-element set of characters containing the characters 0 through 9 inclusive.
+ The production CharacterClassEscape :: D evaluates as follows:
+ Return the set of all characters not included in the set returned by CharacterClassEscape :: d.
+ The production CharacterClassEscape :: s evaluates as follows:
+ Return the set of characters containing the characters that are on the right-hand side of
+ the WhiteSpace or LineTerminator productions.
+ The production CharacterClassEscape :: S evaluates as follows:
+ Return the set of all characters not included in the set returned by CharacterClassEscape :: s.
+ The production CharacterClassEscape :: w evaluates as follows:
+ Return the set of all characters returned by WordCharacters().
+ The production CharacterClassEscape :: W evaluates as follows:
+ Return the set of all characters not included in the set returned by CharacterClassEscape :: w.
+features: [String.fromCodePoint]
+includes: [regExpUtils.js]
+---*/
+
+const str = buildString({
+ loneCodePoints: [],
+ ranges: [
+ [0x00DC00, 0x00DFFF],
+ [0x000000, 0x000008],
+ [0x00000E, 0x00001F],
+ [0x000021, 0x00009F],
+ [0x0000A1, 0x00167F],
+ [0x001681, 0x001FFF],
+ [0x00200B, 0x002027],
+ [0x00202A, 0x00202E],
+ [0x002030, 0x00205E],
+ [0x002060, 0x002FFF],
+ [0x003001, 0x00DBFF],
+ [0x00E000, 0x00FEFE],
+ [0x00FF00, 0x00FFFF],
+ ],
+});
+
+const re = /\S+/g;
+
+const errors = [];
+
+if (!re.test(str)) {
+ // Error, let's find out where
+ for (const char of str) {
+ if (!re.test(char)) {
+ errors.push('0x' + char.codePointAt(0).toString(16));
+ }
+ }
+}
+
+assert.sameValue(
+ errors.length,
+ 0,
+ 'Expected matching code points, but received: ' + errors.join(',')
+);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/RegExp/CharacterClassEscapes/character-class-non-whitespace-class-escape.js b/js/src/tests/test262/built-ins/RegExp/CharacterClassEscapes/character-class-non-whitespace-class-escape.js
new file mode 100644
index 0000000000..785b398eb6
--- /dev/null
+++ b/js/src/tests/test262/built-ins/RegExp/CharacterClassEscapes/character-class-non-whitespace-class-escape.js
@@ -0,0 +1,78 @@
+// Copyright (C) 2018 Leo Balter. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+esid: prod-CharacterClassEscape
+description: >
+ Compare range for non-whitespace class escape \S with flags g
+info: |
+ This is a generated test. Please check out
+ https://github.com/bocoup/test262-regexp-generator
+ for any changes.
+
+ CharacterClassEscape[U] ::
+ d
+ D
+ s
+ S
+ w
+ W
+
+ 21.2.2.12 CharacterClassEscape
+
+ The production CharacterClassEscape :: d evaluates as follows:
+ Return the ten-element set of characters containing the characters 0 through 9 inclusive.
+ The production CharacterClassEscape :: D evaluates as follows:
+ Return the set of all characters not included in the set returned by CharacterClassEscape :: d.
+ The production CharacterClassEscape :: s evaluates as follows:
+ Return the set of characters containing the characters that are on the right-hand side of
+ the WhiteSpace or LineTerminator productions.
+ The production CharacterClassEscape :: S evaluates as follows:
+ Return the set of all characters not included in the set returned by CharacterClassEscape :: s.
+ The production CharacterClassEscape :: w evaluates as follows:
+ Return the set of all characters returned by WordCharacters().
+ The production CharacterClassEscape :: W evaluates as follows:
+ Return the set of all characters not included in the set returned by CharacterClassEscape :: w.
+features: [String.fromCodePoint]
+includes: [regExpUtils.js]
+---*/
+
+const str = buildString({
+ loneCodePoints: [],
+ ranges: [
+ [0x00DC00, 0x00DFFF],
+ [0x000000, 0x000008],
+ [0x00000E, 0x00001F],
+ [0x000021, 0x00009F],
+ [0x0000A1, 0x00167F],
+ [0x001681, 0x001FFF],
+ [0x00200B, 0x002027],
+ [0x00202A, 0x00202E],
+ [0x002030, 0x00205E],
+ [0x002060, 0x002FFF],
+ [0x003001, 0x00DBFF],
+ [0x00E000, 0x00FEFE],
+ [0x00FF00, 0x00FFFF],
+ ],
+});
+
+const re = /\S/g;
+
+const errors = [];
+
+if (!re.test(str)) {
+ // Error, let's find out where
+ for (const char of str) {
+ if (!re.test(char)) {
+ errors.push('0x' + char.codePointAt(0).toString(16));
+ }
+ }
+}
+
+assert.sameValue(
+ errors.length,
+ 0,
+ 'Expected matching code points, but received: ' + errors.join(',')
+);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/RegExp/CharacterClassEscapes/character-class-non-word-class-escape-flags-u.js b/js/src/tests/test262/built-ins/RegExp/CharacterClassEscapes/character-class-non-word-class-escape-flags-u.js
new file mode 100644
index 0000000000..93f822b3db
--- /dev/null
+++ b/js/src/tests/test262/built-ins/RegExp/CharacterClassEscapes/character-class-non-word-class-escape-flags-u.js
@@ -0,0 +1,71 @@
+// Copyright (C) 2018 Leo Balter. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+esid: prod-CharacterClassEscape
+description: >
+ Compare range for non-word class escape \W with flags ug
+info: |
+ This is a generated test. Please check out
+ https://github.com/bocoup/test262-regexp-generator
+ for any changes.
+
+ CharacterClassEscape[U] ::
+ d
+ D
+ s
+ S
+ w
+ W
+
+ 21.2.2.12 CharacterClassEscape
+
+ The production CharacterClassEscape :: d evaluates as follows:
+ Return the ten-element set of characters containing the characters 0 through 9 inclusive.
+ The production CharacterClassEscape :: D evaluates as follows:
+ Return the set of all characters not included in the set returned by CharacterClassEscape :: d.
+ The production CharacterClassEscape :: s evaluates as follows:
+ Return the set of characters containing the characters that are on the right-hand side of
+ the WhiteSpace or LineTerminator productions.
+ The production CharacterClassEscape :: S evaluates as follows:
+ Return the set of all characters not included in the set returned by CharacterClassEscape :: s.
+ The production CharacterClassEscape :: w evaluates as follows:
+ Return the set of all characters returned by WordCharacters().
+ The production CharacterClassEscape :: W evaluates as follows:
+ Return the set of all characters not included in the set returned by CharacterClassEscape :: w.
+features: [String.fromCodePoint]
+includes: [regExpUtils.js]
+---*/
+
+const str = buildString({
+ loneCodePoints: [0x000060],
+ ranges: [
+ [0x00DC00, 0x00DFFF],
+ [0x000000, 0x00002F],
+ [0x00003A, 0x000040],
+ [0x00005B, 0x00005E],
+ [0x00007B, 0x00DBFF],
+ [0x00E000, 0x10FFFF],
+ ],
+});
+
+const re = /\W/ug;
+
+const errors = [];
+
+if (!re.test(str)) {
+ // Error, let's find out where
+ for (const char of str) {
+ if (!re.test(char)) {
+ errors.push('0x' + char.codePointAt(0).toString(16));
+ }
+ }
+}
+
+assert.sameValue(
+ errors.length,
+ 0,
+ 'Expected matching code points, but received: ' + errors.join(',')
+);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/RegExp/CharacterClassEscapes/character-class-non-word-class-escape-plus-quantifier-flags-u.js b/js/src/tests/test262/built-ins/RegExp/CharacterClassEscapes/character-class-non-word-class-escape-plus-quantifier-flags-u.js
new file mode 100644
index 0000000000..724df67ea3
--- /dev/null
+++ b/js/src/tests/test262/built-ins/RegExp/CharacterClassEscapes/character-class-non-word-class-escape-plus-quantifier-flags-u.js
@@ -0,0 +1,71 @@
+// Copyright (C) 2018 Leo Balter. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+esid: prod-CharacterClassEscape
+description: >
+ Compare range for non-word class escape \W+ with flags ug
+info: |
+ This is a generated test. Please check out
+ https://github.com/bocoup/test262-regexp-generator
+ for any changes.
+
+ CharacterClassEscape[U] ::
+ d
+ D
+ s
+ S
+ w
+ W
+
+ 21.2.2.12 CharacterClassEscape
+
+ The production CharacterClassEscape :: d evaluates as follows:
+ Return the ten-element set of characters containing the characters 0 through 9 inclusive.
+ The production CharacterClassEscape :: D evaluates as follows:
+ Return the set of all characters not included in the set returned by CharacterClassEscape :: d.
+ The production CharacterClassEscape :: s evaluates as follows:
+ Return the set of characters containing the characters that are on the right-hand side of
+ the WhiteSpace or LineTerminator productions.
+ The production CharacterClassEscape :: S evaluates as follows:
+ Return the set of all characters not included in the set returned by CharacterClassEscape :: s.
+ The production CharacterClassEscape :: w evaluates as follows:
+ Return the set of all characters returned by WordCharacters().
+ The production CharacterClassEscape :: W evaluates as follows:
+ Return the set of all characters not included in the set returned by CharacterClassEscape :: w.
+features: [String.fromCodePoint]
+includes: [regExpUtils.js]
+---*/
+
+const str = buildString({
+ loneCodePoints: [0x000060],
+ ranges: [
+ [0x00DC00, 0x00DFFF],
+ [0x000000, 0x00002F],
+ [0x00003A, 0x000040],
+ [0x00005B, 0x00005E],
+ [0x00007B, 0x00DBFF],
+ [0x00E000, 0x10FFFF],
+ ],
+});
+
+const re = /\W+/ug;
+
+const errors = [];
+
+if (!re.test(str)) {
+ // Error, let's find out where
+ for (const char of str) {
+ if (!re.test(char)) {
+ errors.push('0x' + char.codePointAt(0).toString(16));
+ }
+ }
+}
+
+assert.sameValue(
+ errors.length,
+ 0,
+ 'Expected matching code points, but received: ' + errors.join(',')
+);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/RegExp/CharacterClassEscapes/character-class-non-word-class-escape-plus-quantifier.js b/js/src/tests/test262/built-ins/RegExp/CharacterClassEscapes/character-class-non-word-class-escape-plus-quantifier.js
new file mode 100644
index 0000000000..2e69ad39ac
--- /dev/null
+++ b/js/src/tests/test262/built-ins/RegExp/CharacterClassEscapes/character-class-non-word-class-escape-plus-quantifier.js
@@ -0,0 +1,71 @@
+// Copyright (C) 2018 Leo Balter. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+esid: prod-CharacterClassEscape
+description: >
+ Compare range for non-word class escape \W+ with flags g
+info: |
+ This is a generated test. Please check out
+ https://github.com/bocoup/test262-regexp-generator
+ for any changes.
+
+ CharacterClassEscape[U] ::
+ d
+ D
+ s
+ S
+ w
+ W
+
+ 21.2.2.12 CharacterClassEscape
+
+ The production CharacterClassEscape :: d evaluates as follows:
+ Return the ten-element set of characters containing the characters 0 through 9 inclusive.
+ The production CharacterClassEscape :: D evaluates as follows:
+ Return the set of all characters not included in the set returned by CharacterClassEscape :: d.
+ The production CharacterClassEscape :: s evaluates as follows:
+ Return the set of characters containing the characters that are on the right-hand side of
+ the WhiteSpace or LineTerminator productions.
+ The production CharacterClassEscape :: S evaluates as follows:
+ Return the set of all characters not included in the set returned by CharacterClassEscape :: s.
+ The production CharacterClassEscape :: w evaluates as follows:
+ Return the set of all characters returned by WordCharacters().
+ The production CharacterClassEscape :: W evaluates as follows:
+ Return the set of all characters not included in the set returned by CharacterClassEscape :: w.
+features: [String.fromCodePoint]
+includes: [regExpUtils.js]
+---*/
+
+const str = buildString({
+ loneCodePoints: [0x000060],
+ ranges: [
+ [0x00DC00, 0x00DFFF],
+ [0x000000, 0x00002F],
+ [0x00003A, 0x000040],
+ [0x00005B, 0x00005E],
+ [0x00007B, 0x00DBFF],
+ [0x00E000, 0x00FFFF],
+ ],
+});
+
+const re = /\W+/g;
+
+const errors = [];
+
+if (!re.test(str)) {
+ // Error, let's find out where
+ for (const char of str) {
+ if (!re.test(char)) {
+ errors.push('0x' + char.codePointAt(0).toString(16));
+ }
+ }
+}
+
+assert.sameValue(
+ errors.length,
+ 0,
+ 'Expected matching code points, but received: ' + errors.join(',')
+);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/RegExp/CharacterClassEscapes/character-class-non-word-class-escape.js b/js/src/tests/test262/built-ins/RegExp/CharacterClassEscapes/character-class-non-word-class-escape.js
new file mode 100644
index 0000000000..a0d191b327
--- /dev/null
+++ b/js/src/tests/test262/built-ins/RegExp/CharacterClassEscapes/character-class-non-word-class-escape.js
@@ -0,0 +1,71 @@
+// Copyright (C) 2018 Leo Balter. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+esid: prod-CharacterClassEscape
+description: >
+ Compare range for non-word class escape \W with flags g
+info: |
+ This is a generated test. Please check out
+ https://github.com/bocoup/test262-regexp-generator
+ for any changes.
+
+ CharacterClassEscape[U] ::
+ d
+ D
+ s
+ S
+ w
+ W
+
+ 21.2.2.12 CharacterClassEscape
+
+ The production CharacterClassEscape :: d evaluates as follows:
+ Return the ten-element set of characters containing the characters 0 through 9 inclusive.
+ The production CharacterClassEscape :: D evaluates as follows:
+ Return the set of all characters not included in the set returned by CharacterClassEscape :: d.
+ The production CharacterClassEscape :: s evaluates as follows:
+ Return the set of characters containing the characters that are on the right-hand side of
+ the WhiteSpace or LineTerminator productions.
+ The production CharacterClassEscape :: S evaluates as follows:
+ Return the set of all characters not included in the set returned by CharacterClassEscape :: s.
+ The production CharacterClassEscape :: w evaluates as follows:
+ Return the set of all characters returned by WordCharacters().
+ The production CharacterClassEscape :: W evaluates as follows:
+ Return the set of all characters not included in the set returned by CharacterClassEscape :: w.
+features: [String.fromCodePoint]
+includes: [regExpUtils.js]
+---*/
+
+const str = buildString({
+ loneCodePoints: [0x000060],
+ ranges: [
+ [0x00DC00, 0x00DFFF],
+ [0x000000, 0x00002F],
+ [0x00003A, 0x000040],
+ [0x00005B, 0x00005E],
+ [0x00007B, 0x00DBFF],
+ [0x00E000, 0x00FFFF],
+ ],
+});
+
+const re = /\W/g;
+
+const errors = [];
+
+if (!re.test(str)) {
+ // Error, let's find out where
+ for (const char of str) {
+ if (!re.test(char)) {
+ errors.push('0x' + char.codePointAt(0).toString(16));
+ }
+ }
+}
+
+assert.sameValue(
+ errors.length,
+ 0,
+ 'Expected matching code points, but received: ' + errors.join(',')
+);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/RegExp/CharacterClassEscapes/character-class-whitespace-class-escape-flags-u.js b/js/src/tests/test262/built-ins/RegExp/CharacterClassEscapes/character-class-whitespace-class-escape-flags-u.js
new file mode 100644
index 0000000000..b5fee5f056
--- /dev/null
+++ b/js/src/tests/test262/built-ins/RegExp/CharacterClassEscapes/character-class-whitespace-class-escape-flags-u.js
@@ -0,0 +1,76 @@
+// Copyright (C) 2018 Leo Balter. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+esid: prod-CharacterClassEscape
+description: >
+ Compare range for whitespace class escape \s with flags ug
+info: |
+ This is a generated test. Please check out
+ https://github.com/bocoup/test262-regexp-generator
+ for any changes.
+
+ CharacterClassEscape[U] ::
+ d
+ D
+ s
+ S
+ w
+ W
+
+ 21.2.2.12 CharacterClassEscape
+
+ The production CharacterClassEscape :: d evaluates as follows:
+ Return the ten-element set of characters containing the characters 0 through 9 inclusive.
+ The production CharacterClassEscape :: D evaluates as follows:
+ Return the set of all characters not included in the set returned by CharacterClassEscape :: d.
+ The production CharacterClassEscape :: s evaluates as follows:
+ Return the set of characters containing the characters that are on the right-hand side of
+ the WhiteSpace or LineTerminator productions.
+ The production CharacterClassEscape :: S evaluates as follows:
+ Return the set of all characters not included in the set returned by CharacterClassEscape :: s.
+ The production CharacterClassEscape :: w evaluates as follows:
+ Return the set of all characters returned by WordCharacters().
+ The production CharacterClassEscape :: W evaluates as follows:
+ Return the set of all characters not included in the set returned by CharacterClassEscape :: w.
+features: [String.fromCodePoint]
+includes: [regExpUtils.js]
+---*/
+
+const str = buildString({
+ loneCodePoints: [
+ 0x000020,
+ 0x0000A0,
+ 0x001680,
+ 0x00202F,
+ 0x00205F,
+ 0x003000,
+ 0x00FEFF,
+ ],
+ ranges: [
+ [0x000009, 0x00000D],
+ [0x002000, 0x00200A],
+ [0x002028, 0x002029],
+ ],
+});
+
+const re = /\s/ug;
+
+const errors = [];
+
+if (!re.test(str)) {
+ // Error, let's find out where
+ for (const char of str) {
+ if (!re.test(char)) {
+ errors.push('0x' + char.codePointAt(0).toString(16));
+ }
+ }
+}
+
+assert.sameValue(
+ errors.length,
+ 0,
+ 'Expected matching code points, but received: ' + errors.join(',')
+);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/RegExp/CharacterClassEscapes/character-class-whitespace-class-escape-plus-quantifier-flags-u.js b/js/src/tests/test262/built-ins/RegExp/CharacterClassEscapes/character-class-whitespace-class-escape-plus-quantifier-flags-u.js
new file mode 100644
index 0000000000..1ec1485039
--- /dev/null
+++ b/js/src/tests/test262/built-ins/RegExp/CharacterClassEscapes/character-class-whitespace-class-escape-plus-quantifier-flags-u.js
@@ -0,0 +1,76 @@
+// Copyright (C) 2018 Leo Balter. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+esid: prod-CharacterClassEscape
+description: >
+ Compare range for whitespace class escape \s+ with flags ug
+info: |
+ This is a generated test. Please check out
+ https://github.com/bocoup/test262-regexp-generator
+ for any changes.
+
+ CharacterClassEscape[U] ::
+ d
+ D
+ s
+ S
+ w
+ W
+
+ 21.2.2.12 CharacterClassEscape
+
+ The production CharacterClassEscape :: d evaluates as follows:
+ Return the ten-element set of characters containing the characters 0 through 9 inclusive.
+ The production CharacterClassEscape :: D evaluates as follows:
+ Return the set of all characters not included in the set returned by CharacterClassEscape :: d.
+ The production CharacterClassEscape :: s evaluates as follows:
+ Return the set of characters containing the characters that are on the right-hand side of
+ the WhiteSpace or LineTerminator productions.
+ The production CharacterClassEscape :: S evaluates as follows:
+ Return the set of all characters not included in the set returned by CharacterClassEscape :: s.
+ The production CharacterClassEscape :: w evaluates as follows:
+ Return the set of all characters returned by WordCharacters().
+ The production CharacterClassEscape :: W evaluates as follows:
+ Return the set of all characters not included in the set returned by CharacterClassEscape :: w.
+features: [String.fromCodePoint]
+includes: [regExpUtils.js]
+---*/
+
+const str = buildString({
+ loneCodePoints: [
+ 0x000020,
+ 0x0000A0,
+ 0x001680,
+ 0x00202F,
+ 0x00205F,
+ 0x003000,
+ 0x00FEFF,
+ ],
+ ranges: [
+ [0x000009, 0x00000D],
+ [0x002000, 0x00200A],
+ [0x002028, 0x002029],
+ ],
+});
+
+const re = /\s+/ug;
+
+const errors = [];
+
+if (!re.test(str)) {
+ // Error, let's find out where
+ for (const char of str) {
+ if (!re.test(char)) {
+ errors.push('0x' + char.codePointAt(0).toString(16));
+ }
+ }
+}
+
+assert.sameValue(
+ errors.length,
+ 0,
+ 'Expected matching code points, but received: ' + errors.join(',')
+);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/RegExp/CharacterClassEscapes/character-class-whitespace-class-escape-plus-quantifier.js b/js/src/tests/test262/built-ins/RegExp/CharacterClassEscapes/character-class-whitespace-class-escape-plus-quantifier.js
new file mode 100644
index 0000000000..c83bb60dd4
--- /dev/null
+++ b/js/src/tests/test262/built-ins/RegExp/CharacterClassEscapes/character-class-whitespace-class-escape-plus-quantifier.js
@@ -0,0 +1,76 @@
+// Copyright (C) 2018 Leo Balter. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+esid: prod-CharacterClassEscape
+description: >
+ Compare range for whitespace class escape \s+ with flags g
+info: |
+ This is a generated test. Please check out
+ https://github.com/bocoup/test262-regexp-generator
+ for any changes.
+
+ CharacterClassEscape[U] ::
+ d
+ D
+ s
+ S
+ w
+ W
+
+ 21.2.2.12 CharacterClassEscape
+
+ The production CharacterClassEscape :: d evaluates as follows:
+ Return the ten-element set of characters containing the characters 0 through 9 inclusive.
+ The production CharacterClassEscape :: D evaluates as follows:
+ Return the set of all characters not included in the set returned by CharacterClassEscape :: d.
+ The production CharacterClassEscape :: s evaluates as follows:
+ Return the set of characters containing the characters that are on the right-hand side of
+ the WhiteSpace or LineTerminator productions.
+ The production CharacterClassEscape :: S evaluates as follows:
+ Return the set of all characters not included in the set returned by CharacterClassEscape :: s.
+ The production CharacterClassEscape :: w evaluates as follows:
+ Return the set of all characters returned by WordCharacters().
+ The production CharacterClassEscape :: W evaluates as follows:
+ Return the set of all characters not included in the set returned by CharacterClassEscape :: w.
+features: [String.fromCodePoint]
+includes: [regExpUtils.js]
+---*/
+
+const str = buildString({
+ loneCodePoints: [
+ 0x000020,
+ 0x0000A0,
+ 0x001680,
+ 0x00202F,
+ 0x00205F,
+ 0x003000,
+ 0x00FEFF,
+ ],
+ ranges: [
+ [0x000009, 0x00000D],
+ [0x002000, 0x00200A],
+ [0x002028, 0x002029],
+ ],
+});
+
+const re = /\s+/g;
+
+const errors = [];
+
+if (!re.test(str)) {
+ // Error, let's find out where
+ for (const char of str) {
+ if (!re.test(char)) {
+ errors.push('0x' + char.codePointAt(0).toString(16));
+ }
+ }
+}
+
+assert.sameValue(
+ errors.length,
+ 0,
+ 'Expected matching code points, but received: ' + errors.join(',')
+);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/RegExp/CharacterClassEscapes/character-class-whitespace-class-escape.js b/js/src/tests/test262/built-ins/RegExp/CharacterClassEscapes/character-class-whitespace-class-escape.js
new file mode 100644
index 0000000000..b63c03686c
--- /dev/null
+++ b/js/src/tests/test262/built-ins/RegExp/CharacterClassEscapes/character-class-whitespace-class-escape.js
@@ -0,0 +1,76 @@
+// Copyright (C) 2018 Leo Balter. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+esid: prod-CharacterClassEscape
+description: >
+ Compare range for whitespace class escape \s with flags g
+info: |
+ This is a generated test. Please check out
+ https://github.com/bocoup/test262-regexp-generator
+ for any changes.
+
+ CharacterClassEscape[U] ::
+ d
+ D
+ s
+ S
+ w
+ W
+
+ 21.2.2.12 CharacterClassEscape
+
+ The production CharacterClassEscape :: d evaluates as follows:
+ Return the ten-element set of characters containing the characters 0 through 9 inclusive.
+ The production CharacterClassEscape :: D evaluates as follows:
+ Return the set of all characters not included in the set returned by CharacterClassEscape :: d.
+ The production CharacterClassEscape :: s evaluates as follows:
+ Return the set of characters containing the characters that are on the right-hand side of
+ the WhiteSpace or LineTerminator productions.
+ The production CharacterClassEscape :: S evaluates as follows:
+ Return the set of all characters not included in the set returned by CharacterClassEscape :: s.
+ The production CharacterClassEscape :: w evaluates as follows:
+ Return the set of all characters returned by WordCharacters().
+ The production CharacterClassEscape :: W evaluates as follows:
+ Return the set of all characters not included in the set returned by CharacterClassEscape :: w.
+features: [String.fromCodePoint]
+includes: [regExpUtils.js]
+---*/
+
+const str = buildString({
+ loneCodePoints: [
+ 0x000020,
+ 0x0000A0,
+ 0x001680,
+ 0x00202F,
+ 0x00205F,
+ 0x003000,
+ 0x00FEFF,
+ ],
+ ranges: [
+ [0x000009, 0x00000D],
+ [0x002000, 0x00200A],
+ [0x002028, 0x002029],
+ ],
+});
+
+const re = /\s/g;
+
+const errors = [];
+
+if (!re.test(str)) {
+ // Error, let's find out where
+ for (const char of str) {
+ if (!re.test(char)) {
+ errors.push('0x' + char.codePointAt(0).toString(16));
+ }
+ }
+}
+
+assert.sameValue(
+ errors.length,
+ 0,
+ 'Expected matching code points, but received: ' + errors.join(',')
+);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/RegExp/CharacterClassEscapes/character-class-word-class-escape-flags-u.js b/js/src/tests/test262/built-ins/RegExp/CharacterClassEscapes/character-class-word-class-escape-flags-u.js
new file mode 100644
index 0000000000..85f990bdd3
--- /dev/null
+++ b/js/src/tests/test262/built-ins/RegExp/CharacterClassEscapes/character-class-word-class-escape-flags-u.js
@@ -0,0 +1,68 @@
+// Copyright (C) 2018 Leo Balter. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+esid: prod-CharacterClassEscape
+description: >
+ Compare range for word class escape \w with flags ug
+info: |
+ This is a generated test. Please check out
+ https://github.com/bocoup/test262-regexp-generator
+ for any changes.
+
+ CharacterClassEscape[U] ::
+ d
+ D
+ s
+ S
+ w
+ W
+
+ 21.2.2.12 CharacterClassEscape
+
+ The production CharacterClassEscape :: d evaluates as follows:
+ Return the ten-element set of characters containing the characters 0 through 9 inclusive.
+ The production CharacterClassEscape :: D evaluates as follows:
+ Return the set of all characters not included in the set returned by CharacterClassEscape :: d.
+ The production CharacterClassEscape :: s evaluates as follows:
+ Return the set of characters containing the characters that are on the right-hand side of
+ the WhiteSpace or LineTerminator productions.
+ The production CharacterClassEscape :: S evaluates as follows:
+ Return the set of all characters not included in the set returned by CharacterClassEscape :: s.
+ The production CharacterClassEscape :: w evaluates as follows:
+ Return the set of all characters returned by WordCharacters().
+ The production CharacterClassEscape :: W evaluates as follows:
+ Return the set of all characters not included in the set returned by CharacterClassEscape :: w.
+features: [String.fromCodePoint]
+includes: [regExpUtils.js]
+---*/
+
+const str = buildString({
+ loneCodePoints: [0x00005F],
+ ranges: [
+ [0x000030, 0x000039],
+ [0x000041, 0x00005A],
+ [0x000061, 0x00007A],
+ ],
+});
+
+const re = /\w/ug;
+
+const errors = [];
+
+if (!re.test(str)) {
+ // Error, let's find out where
+ for (const char of str) {
+ if (!re.test(char)) {
+ errors.push('0x' + char.codePointAt(0).toString(16));
+ }
+ }
+}
+
+assert.sameValue(
+ errors.length,
+ 0,
+ 'Expected matching code points, but received: ' + errors.join(',')
+);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/RegExp/CharacterClassEscapes/character-class-word-class-escape-plus-quantifier-flags-u.js b/js/src/tests/test262/built-ins/RegExp/CharacterClassEscapes/character-class-word-class-escape-plus-quantifier-flags-u.js
new file mode 100644
index 0000000000..27f667229a
--- /dev/null
+++ b/js/src/tests/test262/built-ins/RegExp/CharacterClassEscapes/character-class-word-class-escape-plus-quantifier-flags-u.js
@@ -0,0 +1,68 @@
+// Copyright (C) 2018 Leo Balter. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+esid: prod-CharacterClassEscape
+description: >
+ Compare range for word class escape \w+ with flags ug
+info: |
+ This is a generated test. Please check out
+ https://github.com/bocoup/test262-regexp-generator
+ for any changes.
+
+ CharacterClassEscape[U] ::
+ d
+ D
+ s
+ S
+ w
+ W
+
+ 21.2.2.12 CharacterClassEscape
+
+ The production CharacterClassEscape :: d evaluates as follows:
+ Return the ten-element set of characters containing the characters 0 through 9 inclusive.
+ The production CharacterClassEscape :: D evaluates as follows:
+ Return the set of all characters not included in the set returned by CharacterClassEscape :: d.
+ The production CharacterClassEscape :: s evaluates as follows:
+ Return the set of characters containing the characters that are on the right-hand side of
+ the WhiteSpace or LineTerminator productions.
+ The production CharacterClassEscape :: S evaluates as follows:
+ Return the set of all characters not included in the set returned by CharacterClassEscape :: s.
+ The production CharacterClassEscape :: w evaluates as follows:
+ Return the set of all characters returned by WordCharacters().
+ The production CharacterClassEscape :: W evaluates as follows:
+ Return the set of all characters not included in the set returned by CharacterClassEscape :: w.
+features: [String.fromCodePoint]
+includes: [regExpUtils.js]
+---*/
+
+const str = buildString({
+ loneCodePoints: [0x00005F],
+ ranges: [
+ [0x000030, 0x000039],
+ [0x000041, 0x00005A],
+ [0x000061, 0x00007A],
+ ],
+});
+
+const re = /\w+/ug;
+
+const errors = [];
+
+if (!re.test(str)) {
+ // Error, let's find out where
+ for (const char of str) {
+ if (!re.test(char)) {
+ errors.push('0x' + char.codePointAt(0).toString(16));
+ }
+ }
+}
+
+assert.sameValue(
+ errors.length,
+ 0,
+ 'Expected matching code points, but received: ' + errors.join(',')
+);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/RegExp/CharacterClassEscapes/character-class-word-class-escape-plus-quantifier.js b/js/src/tests/test262/built-ins/RegExp/CharacterClassEscapes/character-class-word-class-escape-plus-quantifier.js
new file mode 100644
index 0000000000..092e9e6ea7
--- /dev/null
+++ b/js/src/tests/test262/built-ins/RegExp/CharacterClassEscapes/character-class-word-class-escape-plus-quantifier.js
@@ -0,0 +1,68 @@
+// Copyright (C) 2018 Leo Balter. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+esid: prod-CharacterClassEscape
+description: >
+ Compare range for word class escape \w+ with flags g
+info: |
+ This is a generated test. Please check out
+ https://github.com/bocoup/test262-regexp-generator
+ for any changes.
+
+ CharacterClassEscape[U] ::
+ d
+ D
+ s
+ S
+ w
+ W
+
+ 21.2.2.12 CharacterClassEscape
+
+ The production CharacterClassEscape :: d evaluates as follows:
+ Return the ten-element set of characters containing the characters 0 through 9 inclusive.
+ The production CharacterClassEscape :: D evaluates as follows:
+ Return the set of all characters not included in the set returned by CharacterClassEscape :: d.
+ The production CharacterClassEscape :: s evaluates as follows:
+ Return the set of characters containing the characters that are on the right-hand side of
+ the WhiteSpace or LineTerminator productions.
+ The production CharacterClassEscape :: S evaluates as follows:
+ Return the set of all characters not included in the set returned by CharacterClassEscape :: s.
+ The production CharacterClassEscape :: w evaluates as follows:
+ Return the set of all characters returned by WordCharacters().
+ The production CharacterClassEscape :: W evaluates as follows:
+ Return the set of all characters not included in the set returned by CharacterClassEscape :: w.
+features: [String.fromCodePoint]
+includes: [regExpUtils.js]
+---*/
+
+const str = buildString({
+ loneCodePoints: [0x00005F],
+ ranges: [
+ [0x000030, 0x000039],
+ [0x000041, 0x00005A],
+ [0x000061, 0x00007A],
+ ],
+});
+
+const re = /\w+/g;
+
+const errors = [];
+
+if (!re.test(str)) {
+ // Error, let's find out where
+ for (const char of str) {
+ if (!re.test(char)) {
+ errors.push('0x' + char.codePointAt(0).toString(16));
+ }
+ }
+}
+
+assert.sameValue(
+ errors.length,
+ 0,
+ 'Expected matching code points, but received: ' + errors.join(',')
+);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/RegExp/CharacterClassEscapes/character-class-word-class-escape.js b/js/src/tests/test262/built-ins/RegExp/CharacterClassEscapes/character-class-word-class-escape.js
new file mode 100644
index 0000000000..35bea6ea4b
--- /dev/null
+++ b/js/src/tests/test262/built-ins/RegExp/CharacterClassEscapes/character-class-word-class-escape.js
@@ -0,0 +1,68 @@
+// Copyright (C) 2018 Leo Balter. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+esid: prod-CharacterClassEscape
+description: >
+ Compare range for word class escape \w with flags g
+info: |
+ This is a generated test. Please check out
+ https://github.com/bocoup/test262-regexp-generator
+ for any changes.
+
+ CharacterClassEscape[U] ::
+ d
+ D
+ s
+ S
+ w
+ W
+
+ 21.2.2.12 CharacterClassEscape
+
+ The production CharacterClassEscape :: d evaluates as follows:
+ Return the ten-element set of characters containing the characters 0 through 9 inclusive.
+ The production CharacterClassEscape :: D evaluates as follows:
+ Return the set of all characters not included in the set returned by CharacterClassEscape :: d.
+ The production CharacterClassEscape :: s evaluates as follows:
+ Return the set of characters containing the characters that are on the right-hand side of
+ the WhiteSpace or LineTerminator productions.
+ The production CharacterClassEscape :: S evaluates as follows:
+ Return the set of all characters not included in the set returned by CharacterClassEscape :: s.
+ The production CharacterClassEscape :: w evaluates as follows:
+ Return the set of all characters returned by WordCharacters().
+ The production CharacterClassEscape :: W evaluates as follows:
+ Return the set of all characters not included in the set returned by CharacterClassEscape :: w.
+features: [String.fromCodePoint]
+includes: [regExpUtils.js]
+---*/
+
+const str = buildString({
+ loneCodePoints: [0x00005F],
+ ranges: [
+ [0x000030, 0x000039],
+ [0x000041, 0x00005A],
+ [0x000061, 0x00007A],
+ ],
+});
+
+const re = /\w/g;
+
+const errors = [];
+
+if (!re.test(str)) {
+ // Error, let's find out where
+ for (const char of str) {
+ if (!re.test(char)) {
+ errors.push('0x' + char.codePointAt(0).toString(16));
+ }
+ }
+}
+
+assert.sameValue(
+ errors.length,
+ 0,
+ 'Expected matching code points, but received: ' + errors.join(',')
+);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/RegExp/CharacterClassEscapes/shell.js b/js/src/tests/test262/built-ins/RegExp/CharacterClassEscapes/shell.js
new file mode 100644
index 0000000000..591d3924c3
--- /dev/null
+++ b/js/src/tests/test262/built-ins/RegExp/CharacterClassEscapes/shell.js
@@ -0,0 +1,115 @@
+// GENERATED, DO NOT EDIT
+// file: regExpUtils.js
+// Copyright (C) 2017 Mathias Bynens. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+description: |
+ Collection of functions used to assert the correctness of RegExp objects.
+defines: [buildString, testPropertyEscapes, testPropertyOfStrings, testExtendedCharacterClass, matchValidator]
+---*/
+
+function buildString(args) {
+ // Use member expressions rather than destructuring `args` for improved
+ // compatibility with engines that only implement assignment patterns
+ // partially or not at all.
+ const loneCodePoints = args.loneCodePoints;
+ const ranges = args.ranges;
+ const CHUNK_SIZE = 10000;
+ let result = Reflect.apply(String.fromCodePoint, null, loneCodePoints);
+ for (let i = 0; i < ranges.length; i++) {
+ const range = ranges[i];
+ const start = range[0];
+ const end = range[1];
+ const codePoints = [];
+ for (let length = 0, codePoint = start; codePoint <= end; codePoint++) {
+ codePoints[length++] = codePoint;
+ if (length === CHUNK_SIZE) {
+ result += Reflect.apply(String.fromCodePoint, null, codePoints);
+ codePoints.length = length = 0;
+ }
+ }
+ result += Reflect.apply(String.fromCodePoint, null, codePoints);
+ }
+ return result;
+}
+
+function printCodePoint(codePoint) {
+ const hex = codePoint
+ .toString(16)
+ .toUpperCase()
+ .padStart(6, "0");
+ return `U+${hex}`;
+}
+
+function printStringCodePoints(string) {
+ const buf = [];
+ for (const symbol of string) {
+ const formatted = printCodePoint(symbol.codePointAt(0));
+ buf.push(formatted);
+ }
+ return buf.join(' ');
+}
+
+function testPropertyEscapes(regExp, string, expression) {
+ if (!regExp.test(string)) {
+ for (const symbol of string) {
+ const formatted = printCodePoint(symbol.codePointAt(0));
+ assert(
+ regExp.test(symbol),
+ `\`${ expression }\` should match ${ formatted } (\`${ symbol }\`)`
+ );
+ }
+ }
+}
+
+function testPropertyOfStrings(args) {
+ // Use member expressions rather than destructuring `args` for improved
+ // compatibility with engines that only implement assignment patterns
+ // partially or not at all.
+ const regExp = args.regExp;
+ const expression = args.expression;
+ const matchStrings = args.matchStrings;
+ const nonMatchStrings = args.nonMatchStrings;
+ const allStrings = matchStrings.join('');
+ if (!regExp.test(allStrings)) {
+ for (const string of matchStrings) {
+ assert(
+ regExp.test(string),
+ `\`${ expression }\` should match ${ string } (${ printStringCodePoints(string) })`
+ );
+ }
+ }
+
+ if (!nonMatchStrings) return;
+
+ const allNonMatchStrings = nonMatchStrings.join('');
+ if (regExp.test(allNonMatchStrings)) {
+ for (const string of nonMatchStrings) {
+ assert(
+ !regExp.test(string),
+ `\`${ expression }\` should not match ${ string } (${ printStringCodePoints(string) })`
+ );
+ }
+ }
+}
+
+// The exact same logic can be used to test extended character classes
+// as enabled through the RegExp `v` flag. This is useful to test not
+// just standalone properties of strings, but also string literals, and
+// set operations.
+const testExtendedCharacterClass = testPropertyOfStrings;
+
+// Returns a function that validates a RegExp match result.
+//
+// Example:
+//
+// var validate = matchValidator(['b'], 1, 'abc');
+// validate(/b/.exec('abc'));
+//
+function matchValidator(expectedEntries, expectedIndex, expectedInput) {
+ return function(match) {
+ assert.compareArray(match, expectedEntries, 'Match entries');
+ assert.sameValue(match.index, expectedIndex, 'Match index');
+ assert.sameValue(match.input, expectedInput, 'Match input');
+ }
+}