diff --git a/test/built-ins/RegExp/unicodeSets/character-class-difference-character-class-escape.js b/test/built-ins/RegExp/unicodeSets/character-class-difference-character-class-escape.js new file mode 100644 index 0000000000..0ca08edb72 --- /dev/null +++ b/test/built-ins/RegExp/unicodeSets/character-class-difference-character-class-escape.js @@ -0,0 +1,40 @@ +// Copyright 2022 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Extended character classes enabled by the RegExp `v` flag support + properties of strings, string literals, and set operations +info: | + Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests + Unicode v14.0.0 +esid: sec-patterns +features: [regexp-v-flag] +includes: [regExpUtils.js] +---*/ + +testExtendedCharacterClass({ + regExp: /^[[0-9]--\d]+$/v, + expression: "[[0-9]--\d]", + matchStrings: [], + nonMatchStrings: [ + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "6\uFE0F\u20E3", + "7", + "7", + "8", + "9", + "9\uFE0F\u20E3", + "C", + "\u2603", + "\u{1D306}", + "\u{1F1E7}\u{1F1EA}" + ], +}); diff --git a/test/built-ins/RegExp/unicodeSets/character-class-difference-character-class.js b/test/built-ins/RegExp/unicodeSets/character-class-difference-character-class.js new file mode 100644 index 0000000000..8c26f57e9c --- /dev/null +++ b/test/built-ins/RegExp/unicodeSets/character-class-difference-character-class.js @@ -0,0 +1,40 @@ +// Copyright 2022 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Extended character classes enabled by the RegExp `v` flag support + properties of strings, string literals, and set operations +info: | + Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests + Unicode v14.0.0 +esid: sec-patterns +features: [regexp-v-flag] +includes: [regExpUtils.js] +---*/ + +testExtendedCharacterClass({ + regExp: /^[[0-9]--[0-9]]+$/v, + expression: "[[0-9]--[0-9]]", + matchStrings: [], + nonMatchStrings: [ + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "6\uFE0F\u20E3", + "7", + "7", + "8", + "9", + "9\uFE0F\u20E3", + "C", + "\u2603", + "\u{1D306}", + "\u{1F1E7}\u{1F1EA}" + ], +}); diff --git a/test/built-ins/RegExp/unicodeSets/character-class-difference-character-property-escape.js b/test/built-ins/RegExp/unicodeSets/character-class-difference-character-property-escape.js new file mode 100644 index 0000000000..45502a0c0f --- /dev/null +++ b/test/built-ins/RegExp/unicodeSets/character-class-difference-character-property-escape.js @@ -0,0 +1,40 @@ +// Copyright 2022 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Extended character classes enabled by the RegExp `v` flag support + properties of strings, string literals, and set operations +info: | + Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests + Unicode v14.0.0 +esid: sec-patterns +features: [regexp-unicode-property-escapes, regexp-v-flag] +includes: [regExpUtils.js] +---*/ + +testExtendedCharacterClass({ + regExp: /^[[0-9]--\p{ASCII_Hex_Digit}]+$/v, + expression: "[[0-9]--\p{ASCII_Hex_Digit}]", + matchStrings: [], + nonMatchStrings: [ + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "6\uFE0F\u20E3", + "7", + "7", + "8", + "9", + "9\uFE0F\u20E3", + "C", + "\u2603", + "\u{1D306}", + "\u{1F1E7}\u{1F1EA}" + ], +}); diff --git a/test/built-ins/RegExp/unicodeSets/character-class-difference-character.js b/test/built-ins/RegExp/unicodeSets/character-class-difference-character.js new file mode 100644 index 0000000000..600d7a26e0 --- /dev/null +++ b/test/built-ins/RegExp/unicodeSets/character-class-difference-character.js @@ -0,0 +1,40 @@ +// Copyright 2022 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Extended character classes enabled by the RegExp `v` flag support + properties of strings, string literals, and set operations +info: | + Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests + Unicode v14.0.0 +esid: sec-patterns +features: [regexp-v-flag] +includes: [regExpUtils.js] +---*/ + +testExtendedCharacterClass({ + regExp: /^[[0-9]--_]+$/v, + expression: "[[0-9]--_]", + matchStrings: [ + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9" + ], + nonMatchStrings: [ + "6\uFE0F\u20E3", + "9\uFE0F\u20E3", + "C", + "\u2603", + "\u{1D306}", + "\u{1F1E7}\u{1F1EA}" + ], +}); diff --git a/test/built-ins/RegExp/unicodeSets/character-class-difference-property-of-strings-escape.js b/test/built-ins/RegExp/unicodeSets/character-class-difference-property-of-strings-escape.js new file mode 100644 index 0000000000..274d1c8216 --- /dev/null +++ b/test/built-ins/RegExp/unicodeSets/character-class-difference-property-of-strings-escape.js @@ -0,0 +1,40 @@ +// Copyright 2022 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Extended character classes enabled by the RegExp `v` flag support + properties of strings, string literals, and set operations +info: | + Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests + Unicode v14.0.0 +esid: sec-patterns +features: [regexp-unicode-property-escapes, regexp-v-flag] +includes: [regExpUtils.js] +---*/ + +testExtendedCharacterClass({ + regExp: /^[[0-9]--\p{Emoji_Keycap_Sequence}]+$/v, + expression: "[[0-9]--\p{Emoji_Keycap_Sequence}]", + matchStrings: [ + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9" + ], + nonMatchStrings: [ + "6\uFE0F\u20E3", + "9\uFE0F\u20E3", + "C", + "\u2603", + "\u{1D306}", + "\u{1F1E7}\u{1F1EA}" + ], +}); diff --git a/test/built-ins/RegExp/unicodeSets/character-class-difference-string-literal.js b/test/built-ins/RegExp/unicodeSets/character-class-difference-string-literal.js new file mode 100644 index 0000000000..c04f00099b --- /dev/null +++ b/test/built-ins/RegExp/unicodeSets/character-class-difference-string-literal.js @@ -0,0 +1,40 @@ +// Copyright 2022 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Extended character classes enabled by the RegExp `v` flag support + properties of strings, string literals, and set operations +info: | + Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests + Unicode v14.0.0 +esid: sec-patterns +features: [regexp-v-flag] +includes: [regExpUtils.js] +---*/ + +testExtendedCharacterClass({ + regExp: /^[[0-9]--\q{0|2|4|9\uFE0F\u20E3}]+$/v, + expression: "[[0-9]--\q{0|2|4|9\uFE0F\u20E3}]", + matchStrings: [ + "1", + "3", + "5", + "6", + "7", + "8", + "9" + ], + nonMatchStrings: [ + "0", + "2", + "4", + "6\uFE0F\u20E3", + "9\uFE0F\u20E3", + "C", + "\u2603", + "\u{1D306}", + "\u{1F1E7}\u{1F1EA}" + ], +}); diff --git a/test/built-ins/RegExp/unicodeSets/character-class-escape-difference-character-class-escape.js b/test/built-ins/RegExp/unicodeSets/character-class-escape-difference-character-class-escape.js new file mode 100644 index 0000000000..7d43dd1a62 --- /dev/null +++ b/test/built-ins/RegExp/unicodeSets/character-class-escape-difference-character-class-escape.js @@ -0,0 +1,40 @@ +// Copyright 2022 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Extended character classes enabled by the RegExp `v` flag support + properties of strings, string literals, and set operations +info: | + Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests + Unicode v14.0.0 +esid: sec-patterns +features: [regexp-v-flag] +includes: [regExpUtils.js] +---*/ + +testExtendedCharacterClass({ + regExp: /^[\d--\d]+$/v, + expression: "[\d--\d]", + matchStrings: [], + nonMatchStrings: [ + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "6\uFE0F\u20E3", + "7", + "7", + "8", + "9", + "9\uFE0F\u20E3", + "C", + "\u2603", + "\u{1D306}", + "\u{1F1E7}\u{1F1EA}" + ], +}); diff --git a/test/built-ins/RegExp/unicodeSets/character-class-escape-difference-character-class.js b/test/built-ins/RegExp/unicodeSets/character-class-escape-difference-character-class.js new file mode 100644 index 0000000000..70e6069e8a --- /dev/null +++ b/test/built-ins/RegExp/unicodeSets/character-class-escape-difference-character-class.js @@ -0,0 +1,40 @@ +// Copyright 2022 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Extended character classes enabled by the RegExp `v` flag support + properties of strings, string literals, and set operations +info: | + Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests + Unicode v14.0.0 +esid: sec-patterns +features: [regexp-v-flag] +includes: [regExpUtils.js] +---*/ + +testExtendedCharacterClass({ + regExp: /^[\d--[0-9]]+$/v, + expression: "[\d--[0-9]]", + matchStrings: [], + nonMatchStrings: [ + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "6\uFE0F\u20E3", + "7", + "7", + "8", + "9", + "9\uFE0F\u20E3", + "C", + "\u2603", + "\u{1D306}", + "\u{1F1E7}\u{1F1EA}" + ], +}); diff --git a/test/built-ins/RegExp/unicodeSets/character-class-escape-difference-character-property-escape.js b/test/built-ins/RegExp/unicodeSets/character-class-escape-difference-character-property-escape.js new file mode 100644 index 0000000000..85be52b46b --- /dev/null +++ b/test/built-ins/RegExp/unicodeSets/character-class-escape-difference-character-property-escape.js @@ -0,0 +1,40 @@ +// Copyright 2022 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Extended character classes enabled by the RegExp `v` flag support + properties of strings, string literals, and set operations +info: | + Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests + Unicode v14.0.0 +esid: sec-patterns +features: [regexp-unicode-property-escapes, regexp-v-flag] +includes: [regExpUtils.js] +---*/ + +testExtendedCharacterClass({ + regExp: /^[\d--\p{ASCII_Hex_Digit}]+$/v, + expression: "[\d--\p{ASCII_Hex_Digit}]", + matchStrings: [], + nonMatchStrings: [ + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "6\uFE0F\u20E3", + "7", + "7", + "8", + "9", + "9\uFE0F\u20E3", + "C", + "\u2603", + "\u{1D306}", + "\u{1F1E7}\u{1F1EA}" + ], +}); diff --git a/test/built-ins/RegExp/unicodeSets/character-class-escape-difference-character.js b/test/built-ins/RegExp/unicodeSets/character-class-escape-difference-character.js new file mode 100644 index 0000000000..3dd4fd090f --- /dev/null +++ b/test/built-ins/RegExp/unicodeSets/character-class-escape-difference-character.js @@ -0,0 +1,40 @@ +// Copyright 2022 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Extended character classes enabled by the RegExp `v` flag support + properties of strings, string literals, and set operations +info: | + Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests + Unicode v14.0.0 +esid: sec-patterns +features: [regexp-v-flag] +includes: [regExpUtils.js] +---*/ + +testExtendedCharacterClass({ + regExp: /^[\d--_]+$/v, + expression: "[\d--_]", + matchStrings: [ + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9" + ], + nonMatchStrings: [ + "6\uFE0F\u20E3", + "9\uFE0F\u20E3", + "C", + "\u2603", + "\u{1D306}", + "\u{1F1E7}\u{1F1EA}" + ], +}); diff --git a/test/built-ins/RegExp/unicodeSets/character-class-escape-difference-property-of-strings-escape.js b/test/built-ins/RegExp/unicodeSets/character-class-escape-difference-property-of-strings-escape.js new file mode 100644 index 0000000000..915aed3429 --- /dev/null +++ b/test/built-ins/RegExp/unicodeSets/character-class-escape-difference-property-of-strings-escape.js @@ -0,0 +1,40 @@ +// Copyright 2022 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Extended character classes enabled by the RegExp `v` flag support + properties of strings, string literals, and set operations +info: | + Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests + Unicode v14.0.0 +esid: sec-patterns +features: [regexp-unicode-property-escapes, regexp-v-flag] +includes: [regExpUtils.js] +---*/ + +testExtendedCharacterClass({ + regExp: /^[\d--\p{Emoji_Keycap_Sequence}]+$/v, + expression: "[\d--\p{Emoji_Keycap_Sequence}]", + matchStrings: [ + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9" + ], + nonMatchStrings: [ + "6\uFE0F\u20E3", + "9\uFE0F\u20E3", + "C", + "\u2603", + "\u{1D306}", + "\u{1F1E7}\u{1F1EA}" + ], +}); diff --git a/test/built-ins/RegExp/unicodeSets/character-class-escape-difference-string-literal.js b/test/built-ins/RegExp/unicodeSets/character-class-escape-difference-string-literal.js new file mode 100644 index 0000000000..9a135820c0 --- /dev/null +++ b/test/built-ins/RegExp/unicodeSets/character-class-escape-difference-string-literal.js @@ -0,0 +1,40 @@ +// Copyright 2022 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Extended character classes enabled by the RegExp `v` flag support + properties of strings, string literals, and set operations +info: | + Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests + Unicode v14.0.0 +esid: sec-patterns +features: [regexp-v-flag] +includes: [regExpUtils.js] +---*/ + +testExtendedCharacterClass({ + regExp: /^[\d--\q{0|2|4|9\uFE0F\u20E3}]+$/v, + expression: "[\d--\q{0|2|4|9\uFE0F\u20E3}]", + matchStrings: [ + "1", + "3", + "5", + "6", + "7", + "8", + "9" + ], + nonMatchStrings: [ + "0", + "2", + "4", + "6\uFE0F\u20E3", + "9\uFE0F\u20E3", + "C", + "\u2603", + "\u{1D306}", + "\u{1F1E7}\u{1F1EA}" + ], +}); diff --git a/test/built-ins/RegExp/unicodeSets/character-class-escape-intersection-character-class-escape.js b/test/built-ins/RegExp/unicodeSets/character-class-escape-intersection-character-class-escape.js new file mode 100644 index 0000000000..e88c183417 --- /dev/null +++ b/test/built-ins/RegExp/unicodeSets/character-class-escape-intersection-character-class-escape.js @@ -0,0 +1,40 @@ +// Copyright 2022 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Extended character classes enabled by the RegExp `v` flag support + properties of strings, string literals, and set operations +info: | + Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests + Unicode v14.0.0 +esid: sec-patterns +features: [regexp-v-flag] +includes: [regExpUtils.js] +---*/ + +testExtendedCharacterClass({ + regExp: /^[\d&&\d]+$/v, + expression: "[\d&&\d]", + matchStrings: [ + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9" + ], + nonMatchStrings: [ + "6\uFE0F\u20E3", + "9\uFE0F\u20E3", + "C", + "\u2603", + "\u{1D306}", + "\u{1F1E7}\u{1F1EA}" + ], +}); diff --git a/test/built-ins/RegExp/unicodeSets/character-class-escape-intersection-character-class.js b/test/built-ins/RegExp/unicodeSets/character-class-escape-intersection-character-class.js new file mode 100644 index 0000000000..8b3d9e059a --- /dev/null +++ b/test/built-ins/RegExp/unicodeSets/character-class-escape-intersection-character-class.js @@ -0,0 +1,40 @@ +// Copyright 2022 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Extended character classes enabled by the RegExp `v` flag support + properties of strings, string literals, and set operations +info: | + Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests + Unicode v14.0.0 +esid: sec-patterns +features: [regexp-v-flag] +includes: [regExpUtils.js] +---*/ + +testExtendedCharacterClass({ + regExp: /^[\d&&[0-9]]+$/v, + expression: "[\d&&[0-9]]", + matchStrings: [ + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9" + ], + nonMatchStrings: [ + "6\uFE0F\u20E3", + "9\uFE0F\u20E3", + "C", + "\u2603", + "\u{1D306}", + "\u{1F1E7}\u{1F1EA}" + ], +}); diff --git a/test/built-ins/RegExp/unicodeSets/character-class-escape-intersection-character-property-escape.js b/test/built-ins/RegExp/unicodeSets/character-class-escape-intersection-character-property-escape.js new file mode 100644 index 0000000000..63eb68b160 --- /dev/null +++ b/test/built-ins/RegExp/unicodeSets/character-class-escape-intersection-character-property-escape.js @@ -0,0 +1,40 @@ +// Copyright 2022 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Extended character classes enabled by the RegExp `v` flag support + properties of strings, string literals, and set operations +info: | + Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests + Unicode v14.0.0 +esid: sec-patterns +features: [regexp-unicode-property-escapes, regexp-v-flag] +includes: [regExpUtils.js] +---*/ + +testExtendedCharacterClass({ + regExp: /^[\d&&\p{ASCII_Hex_Digit}]+$/v, + expression: "[\d&&\p{ASCII_Hex_Digit}]", + matchStrings: [ + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9" + ], + nonMatchStrings: [ + "6\uFE0F\u20E3", + "9\uFE0F\u20E3", + "C", + "\u2603", + "\u{1D306}", + "\u{1F1E7}\u{1F1EA}" + ], +}); diff --git a/test/built-ins/RegExp/unicodeSets/character-class-escape-intersection-character.js b/test/built-ins/RegExp/unicodeSets/character-class-escape-intersection-character.js new file mode 100644 index 0000000000..fc6983b90f --- /dev/null +++ b/test/built-ins/RegExp/unicodeSets/character-class-escape-intersection-character.js @@ -0,0 +1,40 @@ +// Copyright 2022 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Extended character classes enabled by the RegExp `v` flag support + properties of strings, string literals, and set operations +info: | + Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests + Unicode v14.0.0 +esid: sec-patterns +features: [regexp-v-flag] +includes: [regExpUtils.js] +---*/ + +testExtendedCharacterClass({ + regExp: /^[\d&&_]+$/v, + expression: "[\d&&_]", + matchStrings: [], + nonMatchStrings: [ + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "6\uFE0F\u20E3", + "7", + "7", + "8", + "9", + "9\uFE0F\u20E3", + "C", + "\u2603", + "\u{1D306}", + "\u{1F1E7}\u{1F1EA}" + ], +}); diff --git a/test/built-ins/RegExp/unicodeSets/character-class-escape-intersection-property-of-strings-escape.js b/test/built-ins/RegExp/unicodeSets/character-class-escape-intersection-property-of-strings-escape.js new file mode 100644 index 0000000000..150105f1a2 --- /dev/null +++ b/test/built-ins/RegExp/unicodeSets/character-class-escape-intersection-property-of-strings-escape.js @@ -0,0 +1,40 @@ +// Copyright 2022 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Extended character classes enabled by the RegExp `v` flag support + properties of strings, string literals, and set operations +info: | + Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests + Unicode v14.0.0 +esid: sec-patterns +features: [regexp-unicode-property-escapes, regexp-v-flag] +includes: [regExpUtils.js] +---*/ + +testExtendedCharacterClass({ + regExp: /^[\d&&\p{Emoji_Keycap_Sequence}]+$/v, + expression: "[\d&&\p{Emoji_Keycap_Sequence}]", + matchStrings: [], + nonMatchStrings: [ + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "6\uFE0F\u20E3", + "7", + "7", + "8", + "9", + "9\uFE0F\u20E3", + "C", + "\u2603", + "\u{1D306}", + "\u{1F1E7}\u{1F1EA}" + ], +}); diff --git a/test/built-ins/RegExp/unicodeSets/character-class-escape-intersection-string-literal.js b/test/built-ins/RegExp/unicodeSets/character-class-escape-intersection-string-literal.js new file mode 100644 index 0000000000..90c9f86867 --- /dev/null +++ b/test/built-ins/RegExp/unicodeSets/character-class-escape-intersection-string-literal.js @@ -0,0 +1,41 @@ +// Copyright 2022 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Extended character classes enabled by the RegExp `v` flag support + properties of strings, string literals, and set operations +info: | + Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests + Unicode v14.0.0 +esid: sec-patterns +features: [regexp-v-flag] +includes: [regExpUtils.js] +---*/ + +testExtendedCharacterClass({ + regExp: /^[\d&&\q{0|2|4|9\uFE0F\u20E3}]+$/v, + expression: "[\d&&\q{0|2|4|9\uFE0F\u20E3}]", + matchStrings: [ + "0", + "2", + "4" + ], + nonMatchStrings: [ + "1", + "3", + "5", + "6", + "6\uFE0F\u20E3", + "7", + "7", + "8", + "9", + "9\uFE0F\u20E3", + "C", + "\u2603", + "\u{1D306}", + "\u{1F1E7}\u{1F1EA}" + ], +}); diff --git a/test/built-ins/RegExp/unicodeSets/character-class-escape-union-character-class-escape.js b/test/built-ins/RegExp/unicodeSets/character-class-escape-union-character-class-escape.js new file mode 100644 index 0000000000..d355d6304d --- /dev/null +++ b/test/built-ins/RegExp/unicodeSets/character-class-escape-union-character-class-escape.js @@ -0,0 +1,40 @@ +// Copyright 2022 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Extended character classes enabled by the RegExp `v` flag support + properties of strings, string literals, and set operations +info: | + Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests + Unicode v14.0.0 +esid: sec-patterns +features: [regexp-v-flag] +includes: [regExpUtils.js] +---*/ + +testExtendedCharacterClass({ + regExp: /^[\d\d]+$/v, + expression: "[\d\d]", + matchStrings: [ + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9" + ], + nonMatchStrings: [ + "6\uFE0F\u20E3", + "9\uFE0F\u20E3", + "C", + "\u2603", + "\u{1D306}", + "\u{1F1E7}\u{1F1EA}" + ], +}); diff --git a/test/built-ins/RegExp/unicodeSets/character-class-escape-union-character-class.js b/test/built-ins/RegExp/unicodeSets/character-class-escape-union-character-class.js new file mode 100644 index 0000000000..0bd596ad58 --- /dev/null +++ b/test/built-ins/RegExp/unicodeSets/character-class-escape-union-character-class.js @@ -0,0 +1,40 @@ +// Copyright 2022 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Extended character classes enabled by the RegExp `v` flag support + properties of strings, string literals, and set operations +info: | + Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests + Unicode v14.0.0 +esid: sec-patterns +features: [regexp-v-flag] +includes: [regExpUtils.js] +---*/ + +testExtendedCharacterClass({ + regExp: /^[\d[0-9]]+$/v, + expression: "[\d[0-9]]", + matchStrings: [ + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9" + ], + nonMatchStrings: [ + "6\uFE0F\u20E3", + "9\uFE0F\u20E3", + "C", + "\u2603", + "\u{1D306}", + "\u{1F1E7}\u{1F1EA}" + ], +}); diff --git a/test/built-ins/RegExp/unicodeSets/character-class-escape-union-character-property-escape.js b/test/built-ins/RegExp/unicodeSets/character-class-escape-union-character-property-escape.js new file mode 100644 index 0000000000..04bc5f2e37 --- /dev/null +++ b/test/built-ins/RegExp/unicodeSets/character-class-escape-union-character-property-escape.js @@ -0,0 +1,51 @@ +// Copyright 2022 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Extended character classes enabled by the RegExp `v` flag support + properties of strings, string literals, and set operations +info: | + Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests + Unicode v14.0.0 +esid: sec-patterns +features: [regexp-unicode-property-escapes, regexp-v-flag] +includes: [regExpUtils.js] +---*/ + +testExtendedCharacterClass({ + regExp: /^[\d\p{ASCII_Hex_Digit}]+$/v, + expression: "[\d\p{ASCII_Hex_Digit}]", + matchStrings: [ + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9", + "A", + "B", + "C", + "D", + "E", + "F", + "a", + "b", + "c", + "d", + "e", + "f" + ], + nonMatchStrings: [ + "6\uFE0F\u20E3", + "9\uFE0F\u20E3", + "\u2603", + "\u{1D306}", + "\u{1F1E7}\u{1F1EA}" + ], +}); diff --git a/test/built-ins/RegExp/unicodeSets/character-class-escape-union-character.js b/test/built-ins/RegExp/unicodeSets/character-class-escape-union-character.js new file mode 100644 index 0000000000..6c35369600 --- /dev/null +++ b/test/built-ins/RegExp/unicodeSets/character-class-escape-union-character.js @@ -0,0 +1,41 @@ +// Copyright 2022 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Extended character classes enabled by the RegExp `v` flag support + properties of strings, string literals, and set operations +info: | + Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests + Unicode v14.0.0 +esid: sec-patterns +features: [regexp-v-flag] +includes: [regExpUtils.js] +---*/ + +testExtendedCharacterClass({ + regExp: /^[\d_]+$/v, + expression: "[\d_]", + matchStrings: [ + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9", + "_" + ], + nonMatchStrings: [ + "6\uFE0F\u20E3", + "9\uFE0F\u20E3", + "C", + "\u2603", + "\u{1D306}", + "\u{1F1E7}\u{1F1EA}" + ], +}); diff --git a/test/built-ins/RegExp/unicodeSets/character-class-escape-union-property-of-strings-escape.js b/test/built-ins/RegExp/unicodeSets/character-class-escape-union-property-of-strings-escape.js new file mode 100644 index 0000000000..8b03022f85 --- /dev/null +++ b/test/built-ins/RegExp/unicodeSets/character-class-escape-union-property-of-strings-escape.js @@ -0,0 +1,50 @@ +// Copyright 2022 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Extended character classes enabled by the RegExp `v` flag support + properties of strings, string literals, and set operations +info: | + Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests + Unicode v14.0.0 +esid: sec-patterns +features: [regexp-unicode-property-escapes, regexp-v-flag] +includes: [regExpUtils.js] +---*/ + +testExtendedCharacterClass({ + regExp: /^[\d\p{Emoji_Keycap_Sequence}]+$/v, + expression: "[\d\p{Emoji_Keycap_Sequence}]", + matchStrings: [ + "#\uFE0F\u20E3", + "*\uFE0F\u20E3", + "0", + "0\uFE0F\u20E3", + "1", + "1\uFE0F\u20E3", + "2", + "2\uFE0F\u20E3", + "3", + "3\uFE0F\u20E3", + "4", + "4\uFE0F\u20E3", + "5", + "5\uFE0F\u20E3", + "6", + "6\uFE0F\u20E3", + "7", + "7\uFE0F\u20E3", + "8", + "8\uFE0F\u20E3", + "9", + "9\uFE0F\u20E3" + ], + nonMatchStrings: [ + "C", + "\u2603", + "\u{1D306}", + "\u{1F1E7}\u{1F1EA}" + ], +}); diff --git a/test/built-ins/RegExp/unicodeSets/character-class-escape-union-string-literal.js b/test/built-ins/RegExp/unicodeSets/character-class-escape-union-string-literal.js new file mode 100644 index 0000000000..8c91776cef --- /dev/null +++ b/test/built-ins/RegExp/unicodeSets/character-class-escape-union-string-literal.js @@ -0,0 +1,40 @@ +// Copyright 2022 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Extended character classes enabled by the RegExp `v` flag support + properties of strings, string literals, and set operations +info: | + Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests + Unicode v14.0.0 +esid: sec-patterns +features: [regexp-v-flag] +includes: [regExpUtils.js] +---*/ + +testExtendedCharacterClass({ + regExp: /^[\d\q{0|2|4|9\uFE0F\u20E3}]+$/v, + expression: "[\d\q{0|2|4|9\uFE0F\u20E3}]", + matchStrings: [ + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9", + "9\uFE0F\u20E3" + ], + nonMatchStrings: [ + "6\uFE0F\u20E3", + "C", + "\u2603", + "\u{1D306}", + "\u{1F1E7}\u{1F1EA}" + ], +}); diff --git a/test/built-ins/RegExp/unicodeSets/character-class-intersection-character-class-escape.js b/test/built-ins/RegExp/unicodeSets/character-class-intersection-character-class-escape.js new file mode 100644 index 0000000000..b41b660ca6 --- /dev/null +++ b/test/built-ins/RegExp/unicodeSets/character-class-intersection-character-class-escape.js @@ -0,0 +1,40 @@ +// Copyright 2022 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Extended character classes enabled by the RegExp `v` flag support + properties of strings, string literals, and set operations +info: | + Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests + Unicode v14.0.0 +esid: sec-patterns +features: [regexp-v-flag] +includes: [regExpUtils.js] +---*/ + +testExtendedCharacterClass({ + regExp: /^[[0-9]&&\d]+$/v, + expression: "[[0-9]&&\d]", + matchStrings: [ + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9" + ], + nonMatchStrings: [ + "6\uFE0F\u20E3", + "9\uFE0F\u20E3", + "C", + "\u2603", + "\u{1D306}", + "\u{1F1E7}\u{1F1EA}" + ], +}); diff --git a/test/built-ins/RegExp/unicodeSets/character-class-intersection-character-class.js b/test/built-ins/RegExp/unicodeSets/character-class-intersection-character-class.js new file mode 100644 index 0000000000..f9644d6a8e --- /dev/null +++ b/test/built-ins/RegExp/unicodeSets/character-class-intersection-character-class.js @@ -0,0 +1,40 @@ +// Copyright 2022 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Extended character classes enabled by the RegExp `v` flag support + properties of strings, string literals, and set operations +info: | + Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests + Unicode v14.0.0 +esid: sec-patterns +features: [regexp-v-flag] +includes: [regExpUtils.js] +---*/ + +testExtendedCharacterClass({ + regExp: /^[[0-9]&&[0-9]]+$/v, + expression: "[[0-9]&&[0-9]]", + matchStrings: [ + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9" + ], + nonMatchStrings: [ + "6\uFE0F\u20E3", + "9\uFE0F\u20E3", + "C", + "\u2603", + "\u{1D306}", + "\u{1F1E7}\u{1F1EA}" + ], +}); diff --git a/test/built-ins/RegExp/unicodeSets/character-class-intersection-character-property-escape.js b/test/built-ins/RegExp/unicodeSets/character-class-intersection-character-property-escape.js new file mode 100644 index 0000000000..b0c4237616 --- /dev/null +++ b/test/built-ins/RegExp/unicodeSets/character-class-intersection-character-property-escape.js @@ -0,0 +1,40 @@ +// Copyright 2022 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Extended character classes enabled by the RegExp `v` flag support + properties of strings, string literals, and set operations +info: | + Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests + Unicode v14.0.0 +esid: sec-patterns +features: [regexp-unicode-property-escapes, regexp-v-flag] +includes: [regExpUtils.js] +---*/ + +testExtendedCharacterClass({ + regExp: /^[[0-9]&&\p{ASCII_Hex_Digit}]+$/v, + expression: "[[0-9]&&\p{ASCII_Hex_Digit}]", + matchStrings: [ + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9" + ], + nonMatchStrings: [ + "6\uFE0F\u20E3", + "9\uFE0F\u20E3", + "C", + "\u2603", + "\u{1D306}", + "\u{1F1E7}\u{1F1EA}" + ], +}); diff --git a/test/built-ins/RegExp/unicodeSets/character-class-intersection-character.js b/test/built-ins/RegExp/unicodeSets/character-class-intersection-character.js new file mode 100644 index 0000000000..32002abd21 --- /dev/null +++ b/test/built-ins/RegExp/unicodeSets/character-class-intersection-character.js @@ -0,0 +1,40 @@ +// Copyright 2022 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Extended character classes enabled by the RegExp `v` flag support + properties of strings, string literals, and set operations +info: | + Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests + Unicode v14.0.0 +esid: sec-patterns +features: [regexp-v-flag] +includes: [regExpUtils.js] +---*/ + +testExtendedCharacterClass({ + regExp: /^[[0-9]&&_]+$/v, + expression: "[[0-9]&&_]", + matchStrings: [], + nonMatchStrings: [ + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "6\uFE0F\u20E3", + "7", + "7", + "8", + "9", + "9\uFE0F\u20E3", + "C", + "\u2603", + "\u{1D306}", + "\u{1F1E7}\u{1F1EA}" + ], +}); diff --git a/test/built-ins/RegExp/unicodeSets/character-class-intersection-property-of-strings-escape.js b/test/built-ins/RegExp/unicodeSets/character-class-intersection-property-of-strings-escape.js new file mode 100644 index 0000000000..76356d747b --- /dev/null +++ b/test/built-ins/RegExp/unicodeSets/character-class-intersection-property-of-strings-escape.js @@ -0,0 +1,40 @@ +// Copyright 2022 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Extended character classes enabled by the RegExp `v` flag support + properties of strings, string literals, and set operations +info: | + Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests + Unicode v14.0.0 +esid: sec-patterns +features: [regexp-unicode-property-escapes, regexp-v-flag] +includes: [regExpUtils.js] +---*/ + +testExtendedCharacterClass({ + regExp: /^[[0-9]&&\p{Emoji_Keycap_Sequence}]+$/v, + expression: "[[0-9]&&\p{Emoji_Keycap_Sequence}]", + matchStrings: [], + nonMatchStrings: [ + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "6\uFE0F\u20E3", + "7", + "7", + "8", + "9", + "9\uFE0F\u20E3", + "C", + "\u2603", + "\u{1D306}", + "\u{1F1E7}\u{1F1EA}" + ], +}); diff --git a/test/built-ins/RegExp/unicodeSets/character-class-intersection-string-literal.js b/test/built-ins/RegExp/unicodeSets/character-class-intersection-string-literal.js new file mode 100644 index 0000000000..841eaa8bab --- /dev/null +++ b/test/built-ins/RegExp/unicodeSets/character-class-intersection-string-literal.js @@ -0,0 +1,41 @@ +// Copyright 2022 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Extended character classes enabled by the RegExp `v` flag support + properties of strings, string literals, and set operations +info: | + Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests + Unicode v14.0.0 +esid: sec-patterns +features: [regexp-v-flag] +includes: [regExpUtils.js] +---*/ + +testExtendedCharacterClass({ + regExp: /^[[0-9]&&\q{0|2|4|9\uFE0F\u20E3}]+$/v, + expression: "[[0-9]&&\q{0|2|4|9\uFE0F\u20E3}]", + matchStrings: [ + "0", + "2", + "4" + ], + nonMatchStrings: [ + "1", + "3", + "5", + "6", + "6\uFE0F\u20E3", + "7", + "7", + "8", + "9", + "9\uFE0F\u20E3", + "C", + "\u2603", + "\u{1D306}", + "\u{1F1E7}\u{1F1EA}" + ], +}); diff --git a/test/built-ins/RegExp/unicodeSets/character-class-union-character-class-escape.js b/test/built-ins/RegExp/unicodeSets/character-class-union-character-class-escape.js new file mode 100644 index 0000000000..98928749c7 --- /dev/null +++ b/test/built-ins/RegExp/unicodeSets/character-class-union-character-class-escape.js @@ -0,0 +1,40 @@ +// Copyright 2022 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Extended character classes enabled by the RegExp `v` flag support + properties of strings, string literals, and set operations +info: | + Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests + Unicode v14.0.0 +esid: sec-patterns +features: [regexp-v-flag] +includes: [regExpUtils.js] +---*/ + +testExtendedCharacterClass({ + regExp: /^[[0-9]\d]+$/v, + expression: "[[0-9]\d]", + matchStrings: [ + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9" + ], + nonMatchStrings: [ + "6\uFE0F\u20E3", + "9\uFE0F\u20E3", + "C", + "\u2603", + "\u{1D306}", + "\u{1F1E7}\u{1F1EA}" + ], +}); diff --git a/test/built-ins/RegExp/unicodeSets/character-class-union-character-class.js b/test/built-ins/RegExp/unicodeSets/character-class-union-character-class.js new file mode 100644 index 0000000000..e2bed018c9 --- /dev/null +++ b/test/built-ins/RegExp/unicodeSets/character-class-union-character-class.js @@ -0,0 +1,40 @@ +// Copyright 2022 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Extended character classes enabled by the RegExp `v` flag support + properties of strings, string literals, and set operations +info: | + Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests + Unicode v14.0.0 +esid: sec-patterns +features: [regexp-v-flag] +includes: [regExpUtils.js] +---*/ + +testExtendedCharacterClass({ + regExp: /^[[0-9][0-9]]+$/v, + expression: "[[0-9][0-9]]", + matchStrings: [ + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9" + ], + nonMatchStrings: [ + "6\uFE0F\u20E3", + "9\uFE0F\u20E3", + "C", + "\u2603", + "\u{1D306}", + "\u{1F1E7}\u{1F1EA}" + ], +}); diff --git a/test/built-ins/RegExp/unicodeSets/character-class-union-character-property-escape.js b/test/built-ins/RegExp/unicodeSets/character-class-union-character-property-escape.js new file mode 100644 index 0000000000..1b5ecd67c9 --- /dev/null +++ b/test/built-ins/RegExp/unicodeSets/character-class-union-character-property-escape.js @@ -0,0 +1,51 @@ +// Copyright 2022 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Extended character classes enabled by the RegExp `v` flag support + properties of strings, string literals, and set operations +info: | + Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests + Unicode v14.0.0 +esid: sec-patterns +features: [regexp-unicode-property-escapes, regexp-v-flag] +includes: [regExpUtils.js] +---*/ + +testExtendedCharacterClass({ + regExp: /^[[0-9]\p{ASCII_Hex_Digit}]+$/v, + expression: "[[0-9]\p{ASCII_Hex_Digit}]", + matchStrings: [ + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9", + "A", + "B", + "C", + "D", + "E", + "F", + "a", + "b", + "c", + "d", + "e", + "f" + ], + nonMatchStrings: [ + "6\uFE0F\u20E3", + "9\uFE0F\u20E3", + "\u2603", + "\u{1D306}", + "\u{1F1E7}\u{1F1EA}" + ], +}); diff --git a/test/built-ins/RegExp/unicodeSets/character-class-union-character.js b/test/built-ins/RegExp/unicodeSets/character-class-union-character.js new file mode 100644 index 0000000000..0d42ecbbdc --- /dev/null +++ b/test/built-ins/RegExp/unicodeSets/character-class-union-character.js @@ -0,0 +1,41 @@ +// Copyright 2022 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Extended character classes enabled by the RegExp `v` flag support + properties of strings, string literals, and set operations +info: | + Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests + Unicode v14.0.0 +esid: sec-patterns +features: [regexp-v-flag] +includes: [regExpUtils.js] +---*/ + +testExtendedCharacterClass({ + regExp: /^[[0-9]_]+$/v, + expression: "[[0-9]_]", + matchStrings: [ + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9", + "_" + ], + nonMatchStrings: [ + "6\uFE0F\u20E3", + "9\uFE0F\u20E3", + "C", + "\u2603", + "\u{1D306}", + "\u{1F1E7}\u{1F1EA}" + ], +}); diff --git a/test/built-ins/RegExp/unicodeSets/character-class-union-property-of-strings-escape.js b/test/built-ins/RegExp/unicodeSets/character-class-union-property-of-strings-escape.js new file mode 100644 index 0000000000..4fff7123f4 --- /dev/null +++ b/test/built-ins/RegExp/unicodeSets/character-class-union-property-of-strings-escape.js @@ -0,0 +1,50 @@ +// Copyright 2022 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Extended character classes enabled by the RegExp `v` flag support + properties of strings, string literals, and set operations +info: | + Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests + Unicode v14.0.0 +esid: sec-patterns +features: [regexp-unicode-property-escapes, regexp-v-flag] +includes: [regExpUtils.js] +---*/ + +testExtendedCharacterClass({ + regExp: /^[[0-9]\p{Emoji_Keycap_Sequence}]+$/v, + expression: "[[0-9]\p{Emoji_Keycap_Sequence}]", + matchStrings: [ + "#\uFE0F\u20E3", + "*\uFE0F\u20E3", + "0", + "0\uFE0F\u20E3", + "1", + "1\uFE0F\u20E3", + "2", + "2\uFE0F\u20E3", + "3", + "3\uFE0F\u20E3", + "4", + "4\uFE0F\u20E3", + "5", + "5\uFE0F\u20E3", + "6", + "6\uFE0F\u20E3", + "7", + "7\uFE0F\u20E3", + "8", + "8\uFE0F\u20E3", + "9", + "9\uFE0F\u20E3" + ], + nonMatchStrings: [ + "C", + "\u2603", + "\u{1D306}", + "\u{1F1E7}\u{1F1EA}" + ], +}); diff --git a/test/built-ins/RegExp/unicodeSets/character-class-union-string-literal.js b/test/built-ins/RegExp/unicodeSets/character-class-union-string-literal.js new file mode 100644 index 0000000000..68c78bdc0c --- /dev/null +++ b/test/built-ins/RegExp/unicodeSets/character-class-union-string-literal.js @@ -0,0 +1,40 @@ +// Copyright 2022 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Extended character classes enabled by the RegExp `v` flag support + properties of strings, string literals, and set operations +info: | + Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests + Unicode v14.0.0 +esid: sec-patterns +features: [regexp-v-flag] +includes: [regExpUtils.js] +---*/ + +testExtendedCharacterClass({ + regExp: /^[[0-9]\q{0|2|4|9\uFE0F\u20E3}]+$/v, + expression: "[[0-9]\q{0|2|4|9\uFE0F\u20E3}]", + matchStrings: [ + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9", + "9\uFE0F\u20E3" + ], + nonMatchStrings: [ + "6\uFE0F\u20E3", + "C", + "\u2603", + "\u{1D306}", + "\u{1F1E7}\u{1F1EA}" + ], +}); diff --git a/test/built-ins/RegExp/unicodeSets/character-difference-character-class-escape.js b/test/built-ins/RegExp/unicodeSets/character-difference-character-class-escape.js new file mode 100644 index 0000000000..183b6417e8 --- /dev/null +++ b/test/built-ins/RegExp/unicodeSets/character-difference-character-class-escape.js @@ -0,0 +1,32 @@ +// Copyright 2022 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Extended character classes enabled by the RegExp `v` flag support + properties of strings, string literals, and set operations +info: | + Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests + Unicode v14.0.0 +esid: sec-patterns +features: [regexp-v-flag] +includes: [regExpUtils.js] +---*/ + +testExtendedCharacterClass({ + regExp: /^[_--\d]+$/v, + expression: "[_--\d]", + matchStrings: [ + "_" + ], + nonMatchStrings: [ + "6\uFE0F\u20E3", + "7", + "9\uFE0F\u20E3", + "C", + "\u2603", + "\u{1D306}", + "\u{1F1E7}\u{1F1EA}" + ], +}); diff --git a/test/built-ins/RegExp/unicodeSets/character-difference-character-class.js b/test/built-ins/RegExp/unicodeSets/character-difference-character-class.js new file mode 100644 index 0000000000..2d493a8db2 --- /dev/null +++ b/test/built-ins/RegExp/unicodeSets/character-difference-character-class.js @@ -0,0 +1,32 @@ +// Copyright 2022 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Extended character classes enabled by the RegExp `v` flag support + properties of strings, string literals, and set operations +info: | + Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests + Unicode v14.0.0 +esid: sec-patterns +features: [regexp-v-flag] +includes: [regExpUtils.js] +---*/ + +testExtendedCharacterClass({ + regExp: /^[_--[0-9]]+$/v, + expression: "[_--[0-9]]", + matchStrings: [ + "_" + ], + nonMatchStrings: [ + "6\uFE0F\u20E3", + "7", + "9\uFE0F\u20E3", + "C", + "\u2603", + "\u{1D306}", + "\u{1F1E7}\u{1F1EA}" + ], +}); diff --git a/test/built-ins/RegExp/unicodeSets/character-difference-character-property-escape.js b/test/built-ins/RegExp/unicodeSets/character-difference-character-property-escape.js new file mode 100644 index 0000000000..5aead91732 --- /dev/null +++ b/test/built-ins/RegExp/unicodeSets/character-difference-character-property-escape.js @@ -0,0 +1,32 @@ +// Copyright 2022 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Extended character classes enabled by the RegExp `v` flag support + properties of strings, string literals, and set operations +info: | + Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests + Unicode v14.0.0 +esid: sec-patterns +features: [regexp-unicode-property-escapes, regexp-v-flag] +includes: [regExpUtils.js] +---*/ + +testExtendedCharacterClass({ + regExp: /^[_--\p{ASCII_Hex_Digit}]+$/v, + expression: "[_--\p{ASCII_Hex_Digit}]", + matchStrings: [ + "_" + ], + nonMatchStrings: [ + "6\uFE0F\u20E3", + "7", + "9\uFE0F\u20E3", + "C", + "\u2603", + "\u{1D306}", + "\u{1F1E7}\u{1F1EA}" + ], +}); diff --git a/test/built-ins/RegExp/unicodeSets/character-difference-character.js b/test/built-ins/RegExp/unicodeSets/character-difference-character.js new file mode 100644 index 0000000000..273e7b0d8f --- /dev/null +++ b/test/built-ins/RegExp/unicodeSets/character-difference-character.js @@ -0,0 +1,31 @@ +// Copyright 2022 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Extended character classes enabled by the RegExp `v` flag support + properties of strings, string literals, and set operations +info: | + Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests + Unicode v14.0.0 +esid: sec-patterns +features: [regexp-v-flag] +includes: [regExpUtils.js] +---*/ + +testExtendedCharacterClass({ + regExp: /^[_--_]+$/v, + expression: "[_--_]", + matchStrings: [], + nonMatchStrings: [ + "6\uFE0F\u20E3", + "7", + "9\uFE0F\u20E3", + "C", + "_", + "\u2603", + "\u{1D306}", + "\u{1F1E7}\u{1F1EA}" + ], +}); diff --git a/test/built-ins/RegExp/unicodeSets/character-difference-property-of-strings-escape.js b/test/built-ins/RegExp/unicodeSets/character-difference-property-of-strings-escape.js new file mode 100644 index 0000000000..ddec1d20c4 --- /dev/null +++ b/test/built-ins/RegExp/unicodeSets/character-difference-property-of-strings-escape.js @@ -0,0 +1,32 @@ +// Copyright 2022 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Extended character classes enabled by the RegExp `v` flag support + properties of strings, string literals, and set operations +info: | + Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests + Unicode v14.0.0 +esid: sec-patterns +features: [regexp-unicode-property-escapes, regexp-v-flag] +includes: [regExpUtils.js] +---*/ + +testExtendedCharacterClass({ + regExp: /^[_--\p{Emoji_Keycap_Sequence}]+$/v, + expression: "[_--\p{Emoji_Keycap_Sequence}]", + matchStrings: [ + "_" + ], + nonMatchStrings: [ + "6\uFE0F\u20E3", + "7", + "9\uFE0F\u20E3", + "C", + "\u2603", + "\u{1D306}", + "\u{1F1E7}\u{1F1EA}" + ], +}); diff --git a/test/built-ins/RegExp/unicodeSets/character-difference-string-literal.js b/test/built-ins/RegExp/unicodeSets/character-difference-string-literal.js new file mode 100644 index 0000000000..cfc19d52d2 --- /dev/null +++ b/test/built-ins/RegExp/unicodeSets/character-difference-string-literal.js @@ -0,0 +1,32 @@ +// Copyright 2022 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Extended character classes enabled by the RegExp `v` flag support + properties of strings, string literals, and set operations +info: | + Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests + Unicode v14.0.0 +esid: sec-patterns +features: [regexp-v-flag] +includes: [regExpUtils.js] +---*/ + +testExtendedCharacterClass({ + regExp: /^[_--\q{0|2|4|9\uFE0F\u20E3}]+$/v, + expression: "[_--\q{0|2|4|9\uFE0F\u20E3}]", + matchStrings: [ + "_" + ], + nonMatchStrings: [ + "6\uFE0F\u20E3", + "7", + "9\uFE0F\u20E3", + "C", + "\u2603", + "\u{1D306}", + "\u{1F1E7}\u{1F1EA}" + ], +}); diff --git a/test/built-ins/RegExp/unicodeSets/character-intersection-character-class-escape.js b/test/built-ins/RegExp/unicodeSets/character-intersection-character-class-escape.js new file mode 100644 index 0000000000..3aad2d0f73 --- /dev/null +++ b/test/built-ins/RegExp/unicodeSets/character-intersection-character-class-escape.js @@ -0,0 +1,31 @@ +// Copyright 2022 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Extended character classes enabled by the RegExp `v` flag support + properties of strings, string literals, and set operations +info: | + Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests + Unicode v14.0.0 +esid: sec-patterns +features: [regexp-v-flag] +includes: [regExpUtils.js] +---*/ + +testExtendedCharacterClass({ + regExp: /^[_&&\d]+$/v, + expression: "[_&&\d]", + matchStrings: [], + nonMatchStrings: [ + "6\uFE0F\u20E3", + "7", + "9\uFE0F\u20E3", + "C", + "_", + "\u2603", + "\u{1D306}", + "\u{1F1E7}\u{1F1EA}" + ], +}); diff --git a/test/built-ins/RegExp/unicodeSets/character-intersection-character-class.js b/test/built-ins/RegExp/unicodeSets/character-intersection-character-class.js new file mode 100644 index 0000000000..94c6066b81 --- /dev/null +++ b/test/built-ins/RegExp/unicodeSets/character-intersection-character-class.js @@ -0,0 +1,31 @@ +// Copyright 2022 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Extended character classes enabled by the RegExp `v` flag support + properties of strings, string literals, and set operations +info: | + Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests + Unicode v14.0.0 +esid: sec-patterns +features: [regexp-v-flag] +includes: [regExpUtils.js] +---*/ + +testExtendedCharacterClass({ + regExp: /^[_&&[0-9]]+$/v, + expression: "[_&&[0-9]]", + matchStrings: [], + nonMatchStrings: [ + "6\uFE0F\u20E3", + "7", + "9\uFE0F\u20E3", + "C", + "_", + "\u2603", + "\u{1D306}", + "\u{1F1E7}\u{1F1EA}" + ], +}); diff --git a/test/built-ins/RegExp/unicodeSets/character-intersection-character-property-escape.js b/test/built-ins/RegExp/unicodeSets/character-intersection-character-property-escape.js new file mode 100644 index 0000000000..27ad5a101b --- /dev/null +++ b/test/built-ins/RegExp/unicodeSets/character-intersection-character-property-escape.js @@ -0,0 +1,31 @@ +// Copyright 2022 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Extended character classes enabled by the RegExp `v` flag support + properties of strings, string literals, and set operations +info: | + Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests + Unicode v14.0.0 +esid: sec-patterns +features: [regexp-unicode-property-escapes, regexp-v-flag] +includes: [regExpUtils.js] +---*/ + +testExtendedCharacterClass({ + regExp: /^[_&&\p{ASCII_Hex_Digit}]+$/v, + expression: "[_&&\p{ASCII_Hex_Digit}]", + matchStrings: [], + nonMatchStrings: [ + "6\uFE0F\u20E3", + "7", + "9\uFE0F\u20E3", + "C", + "_", + "\u2603", + "\u{1D306}", + "\u{1F1E7}\u{1F1EA}" + ], +}); diff --git a/test/built-ins/RegExp/unicodeSets/character-intersection-character.js b/test/built-ins/RegExp/unicodeSets/character-intersection-character.js new file mode 100644 index 0000000000..d3020599b5 --- /dev/null +++ b/test/built-ins/RegExp/unicodeSets/character-intersection-character.js @@ -0,0 +1,32 @@ +// Copyright 2022 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Extended character classes enabled by the RegExp `v` flag support + properties of strings, string literals, and set operations +info: | + Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests + Unicode v14.0.0 +esid: sec-patterns +features: [regexp-v-flag] +includes: [regExpUtils.js] +---*/ + +testExtendedCharacterClass({ + regExp: /^[_&&_]+$/v, + expression: "[_&&_]", + matchStrings: [ + "_" + ], + nonMatchStrings: [ + "6\uFE0F\u20E3", + "7", + "9\uFE0F\u20E3", + "C", + "\u2603", + "\u{1D306}", + "\u{1F1E7}\u{1F1EA}" + ], +}); diff --git a/test/built-ins/RegExp/unicodeSets/character-intersection-property-of-strings-escape.js b/test/built-ins/RegExp/unicodeSets/character-intersection-property-of-strings-escape.js new file mode 100644 index 0000000000..ba1e87442c --- /dev/null +++ b/test/built-ins/RegExp/unicodeSets/character-intersection-property-of-strings-escape.js @@ -0,0 +1,31 @@ +// Copyright 2022 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Extended character classes enabled by the RegExp `v` flag support + properties of strings, string literals, and set operations +info: | + Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests + Unicode v14.0.0 +esid: sec-patterns +features: [regexp-unicode-property-escapes, regexp-v-flag] +includes: [regExpUtils.js] +---*/ + +testExtendedCharacterClass({ + regExp: /^[_&&\p{Emoji_Keycap_Sequence}]+$/v, + expression: "[_&&\p{Emoji_Keycap_Sequence}]", + matchStrings: [], + nonMatchStrings: [ + "6\uFE0F\u20E3", + "7", + "9\uFE0F\u20E3", + "C", + "_", + "\u2603", + "\u{1D306}", + "\u{1F1E7}\u{1F1EA}" + ], +}); diff --git a/test/built-ins/RegExp/unicodeSets/character-intersection-string-literal.js b/test/built-ins/RegExp/unicodeSets/character-intersection-string-literal.js new file mode 100644 index 0000000000..fe2db70fdc --- /dev/null +++ b/test/built-ins/RegExp/unicodeSets/character-intersection-string-literal.js @@ -0,0 +1,31 @@ +// Copyright 2022 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Extended character classes enabled by the RegExp `v` flag support + properties of strings, string literals, and set operations +info: | + Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests + Unicode v14.0.0 +esid: sec-patterns +features: [regexp-v-flag] +includes: [regExpUtils.js] +---*/ + +testExtendedCharacterClass({ + regExp: /^[_&&\q{0|2|4|9\uFE0F\u20E3}]+$/v, + expression: "[_&&\q{0|2|4|9\uFE0F\u20E3}]", + matchStrings: [], + nonMatchStrings: [ + "6\uFE0F\u20E3", + "7", + "9\uFE0F\u20E3", + "C", + "_", + "\u2603", + "\u{1D306}", + "\u{1F1E7}\u{1F1EA}" + ], +}); diff --git a/test/built-ins/RegExp/unicodeSets/character-property-escape-difference-character-class-escape.js b/test/built-ins/RegExp/unicodeSets/character-property-escape-difference-character-class-escape.js new file mode 100644 index 0000000000..233426c32c --- /dev/null +++ b/test/built-ins/RegExp/unicodeSets/character-property-escape-difference-character-class-escape.js @@ -0,0 +1,52 @@ +// Copyright 2022 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Extended character classes enabled by the RegExp `v` flag support + properties of strings, string literals, and set operations +info: | + Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests + Unicode v14.0.0 +esid: sec-patterns +features: [regexp-unicode-property-escapes, regexp-v-flag] +includes: [regExpUtils.js] +---*/ + +testExtendedCharacterClass({ + regExp: /^[\p{ASCII_Hex_Digit}--\d]+$/v, + expression: "[\p{ASCII_Hex_Digit}--\d]", + matchStrings: [ + "A", + "B", + "C", + "D", + "E", + "F", + "a", + "b", + "c", + "d", + "e", + "f" + ], + nonMatchStrings: [ + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "6\uFE0F\u20E3", + "7", + "7", + "8", + "9", + "9\uFE0F\u20E3", + "\u2603", + "\u{1D306}", + "\u{1F1E7}\u{1F1EA}" + ], +}); diff --git a/test/built-ins/RegExp/unicodeSets/character-property-escape-difference-character-class.js b/test/built-ins/RegExp/unicodeSets/character-property-escape-difference-character-class.js new file mode 100644 index 0000000000..a349fc7245 --- /dev/null +++ b/test/built-ins/RegExp/unicodeSets/character-property-escape-difference-character-class.js @@ -0,0 +1,52 @@ +// Copyright 2022 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Extended character classes enabled by the RegExp `v` flag support + properties of strings, string literals, and set operations +info: | + Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests + Unicode v14.0.0 +esid: sec-patterns +features: [regexp-unicode-property-escapes, regexp-v-flag] +includes: [regExpUtils.js] +---*/ + +testExtendedCharacterClass({ + regExp: /^[\p{ASCII_Hex_Digit}--[0-9]]+$/v, + expression: "[\p{ASCII_Hex_Digit}--[0-9]]", + matchStrings: [ + "A", + "B", + "C", + "D", + "E", + "F", + "a", + "b", + "c", + "d", + "e", + "f" + ], + nonMatchStrings: [ + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "6\uFE0F\u20E3", + "7", + "7", + "8", + "9", + "9\uFE0F\u20E3", + "\u2603", + "\u{1D306}", + "\u{1F1E7}\u{1F1EA}" + ], +}); diff --git a/test/built-ins/RegExp/unicodeSets/character-property-escape-difference-character-property-escape.js b/test/built-ins/RegExp/unicodeSets/character-property-escape-difference-character-property-escape.js new file mode 100644 index 0000000000..14da70add0 --- /dev/null +++ b/test/built-ins/RegExp/unicodeSets/character-property-escape-difference-character-property-escape.js @@ -0,0 +1,52 @@ +// Copyright 2022 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Extended character classes enabled by the RegExp `v` flag support + properties of strings, string literals, and set operations +info: | + Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests + Unicode v14.0.0 +esid: sec-patterns +features: [regexp-unicode-property-escapes, regexp-v-flag] +includes: [regExpUtils.js] +---*/ + +testExtendedCharacterClass({ + regExp: /^[\p{ASCII_Hex_Digit}--\p{ASCII_Hex_Digit}]+$/v, + expression: "[\p{ASCII_Hex_Digit}--\p{ASCII_Hex_Digit}]", + matchStrings: [], + nonMatchStrings: [ + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "6\uFE0F\u20E3", + "7", + "7", + "8", + "9", + "9\uFE0F\u20E3", + "A", + "B", + "C", + "C", + "D", + "E", + "F", + "a", + "b", + "c", + "d", + "e", + "f", + "\u2603", + "\u{1D306}", + "\u{1F1E7}\u{1F1EA}" + ], +}); diff --git a/test/built-ins/RegExp/unicodeSets/character-property-escape-difference-character.js b/test/built-ins/RegExp/unicodeSets/character-property-escape-difference-character.js new file mode 100644 index 0000000000..6156bd1503 --- /dev/null +++ b/test/built-ins/RegExp/unicodeSets/character-property-escape-difference-character.js @@ -0,0 +1,51 @@ +// Copyright 2022 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Extended character classes enabled by the RegExp `v` flag support + properties of strings, string literals, and set operations +info: | + Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests + Unicode v14.0.0 +esid: sec-patterns +features: [regexp-unicode-property-escapes, regexp-v-flag] +includes: [regExpUtils.js] +---*/ + +testExtendedCharacterClass({ + regExp: /^[\p{ASCII_Hex_Digit}--_]+$/v, + expression: "[\p{ASCII_Hex_Digit}--_]", + matchStrings: [ + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9", + "A", + "B", + "C", + "D", + "E", + "F", + "a", + "b", + "c", + "d", + "e", + "f" + ], + nonMatchStrings: [ + "6\uFE0F\u20E3", + "9\uFE0F\u20E3", + "\u2603", + "\u{1D306}", + "\u{1F1E7}\u{1F1EA}" + ], +}); diff --git a/test/built-ins/RegExp/unicodeSets/character-property-escape-difference-property-of-strings-escape.js b/test/built-ins/RegExp/unicodeSets/character-property-escape-difference-property-of-strings-escape.js new file mode 100644 index 0000000000..a17a3d759e --- /dev/null +++ b/test/built-ins/RegExp/unicodeSets/character-property-escape-difference-property-of-strings-escape.js @@ -0,0 +1,51 @@ +// Copyright 2022 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Extended character classes enabled by the RegExp `v` flag support + properties of strings, string literals, and set operations +info: | + Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests + Unicode v14.0.0 +esid: sec-patterns +features: [regexp-unicode-property-escapes, regexp-v-flag] +includes: [regExpUtils.js] +---*/ + +testExtendedCharacterClass({ + regExp: /^[\p{ASCII_Hex_Digit}--\p{Emoji_Keycap_Sequence}]+$/v, + expression: "[\p{ASCII_Hex_Digit}--\p{Emoji_Keycap_Sequence}]", + matchStrings: [ + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9", + "A", + "B", + "C", + "D", + "E", + "F", + "a", + "b", + "c", + "d", + "e", + "f" + ], + nonMatchStrings: [ + "6\uFE0F\u20E3", + "9\uFE0F\u20E3", + "\u2603", + "\u{1D306}", + "\u{1F1E7}\u{1F1EA}" + ], +}); diff --git a/test/built-ins/RegExp/unicodeSets/character-property-escape-difference-string-literal.js b/test/built-ins/RegExp/unicodeSets/character-property-escape-difference-string-literal.js new file mode 100644 index 0000000000..4ad9cb97b0 --- /dev/null +++ b/test/built-ins/RegExp/unicodeSets/character-property-escape-difference-string-literal.js @@ -0,0 +1,51 @@ +// Copyright 2022 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Extended character classes enabled by the RegExp `v` flag support + properties of strings, string literals, and set operations +info: | + Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests + Unicode v14.0.0 +esid: sec-patterns +features: [regexp-unicode-property-escapes, regexp-v-flag] +includes: [regExpUtils.js] +---*/ + +testExtendedCharacterClass({ + regExp: /^[\p{ASCII_Hex_Digit}--\q{0|2|4|9\uFE0F\u20E3}]+$/v, + expression: "[\p{ASCII_Hex_Digit}--\q{0|2|4|9\uFE0F\u20E3}]", + matchStrings: [ + "1", + "3", + "5", + "6", + "7", + "8", + "9", + "A", + "B", + "C", + "D", + "E", + "F", + "a", + "b", + "c", + "d", + "e", + "f" + ], + nonMatchStrings: [ + "0", + "2", + "4", + "6\uFE0F\u20E3", + "9\uFE0F\u20E3", + "\u2603", + "\u{1D306}", + "\u{1F1E7}\u{1F1EA}" + ], +}); diff --git a/test/built-ins/RegExp/unicodeSets/character-property-escape-intersection-character-class-escape.js b/test/built-ins/RegExp/unicodeSets/character-property-escape-intersection-character-class-escape.js new file mode 100644 index 0000000000..61cc324c33 --- /dev/null +++ b/test/built-ins/RegExp/unicodeSets/character-property-escape-intersection-character-class-escape.js @@ -0,0 +1,52 @@ +// Copyright 2022 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Extended character classes enabled by the RegExp `v` flag support + properties of strings, string literals, and set operations +info: | + Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests + Unicode v14.0.0 +esid: sec-patterns +features: [regexp-unicode-property-escapes, regexp-v-flag] +includes: [regExpUtils.js] +---*/ + +testExtendedCharacterClass({ + regExp: /^[\p{ASCII_Hex_Digit}&&\d]+$/v, + expression: "[\p{ASCII_Hex_Digit}&&\d]", + matchStrings: [ + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9" + ], + nonMatchStrings: [ + "6\uFE0F\u20E3", + "9\uFE0F\u20E3", + "A", + "B", + "C", + "C", + "D", + "E", + "F", + "a", + "b", + "c", + "d", + "e", + "f", + "\u2603", + "\u{1D306}", + "\u{1F1E7}\u{1F1EA}" + ], +}); diff --git a/test/built-ins/RegExp/unicodeSets/character-property-escape-intersection-character-class.js b/test/built-ins/RegExp/unicodeSets/character-property-escape-intersection-character-class.js new file mode 100644 index 0000000000..0caa9f3516 --- /dev/null +++ b/test/built-ins/RegExp/unicodeSets/character-property-escape-intersection-character-class.js @@ -0,0 +1,52 @@ +// Copyright 2022 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Extended character classes enabled by the RegExp `v` flag support + properties of strings, string literals, and set operations +info: | + Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests + Unicode v14.0.0 +esid: sec-patterns +features: [regexp-unicode-property-escapes, regexp-v-flag] +includes: [regExpUtils.js] +---*/ + +testExtendedCharacterClass({ + regExp: /^[\p{ASCII_Hex_Digit}&&[0-9]]+$/v, + expression: "[\p{ASCII_Hex_Digit}&&[0-9]]", + matchStrings: [ + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9" + ], + nonMatchStrings: [ + "6\uFE0F\u20E3", + "9\uFE0F\u20E3", + "A", + "B", + "C", + "C", + "D", + "E", + "F", + "a", + "b", + "c", + "d", + "e", + "f", + "\u2603", + "\u{1D306}", + "\u{1F1E7}\u{1F1EA}" + ], +}); diff --git a/test/built-ins/RegExp/unicodeSets/character-property-escape-intersection-character-property-escape.js b/test/built-ins/RegExp/unicodeSets/character-property-escape-intersection-character-property-escape.js new file mode 100644 index 0000000000..0fbfed19a3 --- /dev/null +++ b/test/built-ins/RegExp/unicodeSets/character-property-escape-intersection-character-property-escape.js @@ -0,0 +1,51 @@ +// Copyright 2022 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Extended character classes enabled by the RegExp `v` flag support + properties of strings, string literals, and set operations +info: | + Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests + Unicode v14.0.0 +esid: sec-patterns +features: [regexp-unicode-property-escapes, regexp-v-flag] +includes: [regExpUtils.js] +---*/ + +testExtendedCharacterClass({ + regExp: /^[\p{ASCII_Hex_Digit}&&\p{ASCII_Hex_Digit}]+$/v, + expression: "[\p{ASCII_Hex_Digit}&&\p{ASCII_Hex_Digit}]", + matchStrings: [ + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9", + "A", + "B", + "C", + "D", + "E", + "F", + "a", + "b", + "c", + "d", + "e", + "f" + ], + nonMatchStrings: [ + "6\uFE0F\u20E3", + "9\uFE0F\u20E3", + "\u2603", + "\u{1D306}", + "\u{1F1E7}\u{1F1EA}" + ], +}); diff --git a/test/built-ins/RegExp/unicodeSets/character-property-escape-intersection-character.js b/test/built-ins/RegExp/unicodeSets/character-property-escape-intersection-character.js new file mode 100644 index 0000000000..ec56910736 --- /dev/null +++ b/test/built-ins/RegExp/unicodeSets/character-property-escape-intersection-character.js @@ -0,0 +1,52 @@ +// Copyright 2022 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Extended character classes enabled by the RegExp `v` flag support + properties of strings, string literals, and set operations +info: | + Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests + Unicode v14.0.0 +esid: sec-patterns +features: [regexp-unicode-property-escapes, regexp-v-flag] +includes: [regExpUtils.js] +---*/ + +testExtendedCharacterClass({ + regExp: /^[\p{ASCII_Hex_Digit}&&_]+$/v, + expression: "[\p{ASCII_Hex_Digit}&&_]", + matchStrings: [], + nonMatchStrings: [ + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "6\uFE0F\u20E3", + "7", + "7", + "8", + "9", + "9\uFE0F\u20E3", + "A", + "B", + "C", + "C", + "D", + "E", + "F", + "a", + "b", + "c", + "d", + "e", + "f", + "\u2603", + "\u{1D306}", + "\u{1F1E7}\u{1F1EA}" + ], +}); diff --git a/test/built-ins/RegExp/unicodeSets/character-property-escape-intersection-property-of-strings-escape.js b/test/built-ins/RegExp/unicodeSets/character-property-escape-intersection-property-of-strings-escape.js new file mode 100644 index 0000000000..068eae6e1a --- /dev/null +++ b/test/built-ins/RegExp/unicodeSets/character-property-escape-intersection-property-of-strings-escape.js @@ -0,0 +1,52 @@ +// Copyright 2022 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Extended character classes enabled by the RegExp `v` flag support + properties of strings, string literals, and set operations +info: | + Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests + Unicode v14.0.0 +esid: sec-patterns +features: [regexp-unicode-property-escapes, regexp-v-flag] +includes: [regExpUtils.js] +---*/ + +testExtendedCharacterClass({ + regExp: /^[\p{ASCII_Hex_Digit}&&\p{Emoji_Keycap_Sequence}]+$/v, + expression: "[\p{ASCII_Hex_Digit}&&\p{Emoji_Keycap_Sequence}]", + matchStrings: [], + nonMatchStrings: [ + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "6\uFE0F\u20E3", + "7", + "7", + "8", + "9", + "9\uFE0F\u20E3", + "A", + "B", + "C", + "C", + "D", + "E", + "F", + "a", + "b", + "c", + "d", + "e", + "f", + "\u2603", + "\u{1D306}", + "\u{1F1E7}\u{1F1EA}" + ], +}); diff --git a/test/built-ins/RegExp/unicodeSets/character-property-escape-intersection-string-literal.js b/test/built-ins/RegExp/unicodeSets/character-property-escape-intersection-string-literal.js new file mode 100644 index 0000000000..d42ad7b644 --- /dev/null +++ b/test/built-ins/RegExp/unicodeSets/character-property-escape-intersection-string-literal.js @@ -0,0 +1,53 @@ +// Copyright 2022 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Extended character classes enabled by the RegExp `v` flag support + properties of strings, string literals, and set operations +info: | + Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests + Unicode v14.0.0 +esid: sec-patterns +features: [regexp-unicode-property-escapes, regexp-v-flag] +includes: [regExpUtils.js] +---*/ + +testExtendedCharacterClass({ + regExp: /^[\p{ASCII_Hex_Digit}&&\q{0|2|4|9\uFE0F\u20E3}]+$/v, + expression: "[\p{ASCII_Hex_Digit}&&\q{0|2|4|9\uFE0F\u20E3}]", + matchStrings: [ + "0", + "2", + "4" + ], + nonMatchStrings: [ + "1", + "3", + "5", + "6", + "6\uFE0F\u20E3", + "7", + "7", + "8", + "9", + "9\uFE0F\u20E3", + "A", + "B", + "C", + "C", + "D", + "E", + "F", + "a", + "b", + "c", + "d", + "e", + "f", + "\u2603", + "\u{1D306}", + "\u{1F1E7}\u{1F1EA}" + ], +}); diff --git a/test/built-ins/RegExp/unicodeSets/character-property-escape-union-character-class-escape.js b/test/built-ins/RegExp/unicodeSets/character-property-escape-union-character-class-escape.js new file mode 100644 index 0000000000..cd43433987 --- /dev/null +++ b/test/built-ins/RegExp/unicodeSets/character-property-escape-union-character-class-escape.js @@ -0,0 +1,51 @@ +// Copyright 2022 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Extended character classes enabled by the RegExp `v` flag support + properties of strings, string literals, and set operations +info: | + Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests + Unicode v14.0.0 +esid: sec-patterns +features: [regexp-unicode-property-escapes, regexp-v-flag] +includes: [regExpUtils.js] +---*/ + +testExtendedCharacterClass({ + regExp: /^[\p{ASCII_Hex_Digit}\d]+$/v, + expression: "[\p{ASCII_Hex_Digit}\d]", + matchStrings: [ + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9", + "A", + "B", + "C", + "D", + "E", + "F", + "a", + "b", + "c", + "d", + "e", + "f" + ], + nonMatchStrings: [ + "6\uFE0F\u20E3", + "9\uFE0F\u20E3", + "\u2603", + "\u{1D306}", + "\u{1F1E7}\u{1F1EA}" + ], +}); diff --git a/test/built-ins/RegExp/unicodeSets/character-property-escape-union-character-class.js b/test/built-ins/RegExp/unicodeSets/character-property-escape-union-character-class.js new file mode 100644 index 0000000000..2abf4d9cc3 --- /dev/null +++ b/test/built-ins/RegExp/unicodeSets/character-property-escape-union-character-class.js @@ -0,0 +1,51 @@ +// Copyright 2022 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Extended character classes enabled by the RegExp `v` flag support + properties of strings, string literals, and set operations +info: | + Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests + Unicode v14.0.0 +esid: sec-patterns +features: [regexp-unicode-property-escapes, regexp-v-flag] +includes: [regExpUtils.js] +---*/ + +testExtendedCharacterClass({ + regExp: /^[\p{ASCII_Hex_Digit}[0-9]]+$/v, + expression: "[\p{ASCII_Hex_Digit}[0-9]]", + matchStrings: [ + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9", + "A", + "B", + "C", + "D", + "E", + "F", + "a", + "b", + "c", + "d", + "e", + "f" + ], + nonMatchStrings: [ + "6\uFE0F\u20E3", + "9\uFE0F\u20E3", + "\u2603", + "\u{1D306}", + "\u{1F1E7}\u{1F1EA}" + ], +}); diff --git a/test/built-ins/RegExp/unicodeSets/character-property-escape-union-character-property-escape.js b/test/built-ins/RegExp/unicodeSets/character-property-escape-union-character-property-escape.js new file mode 100644 index 0000000000..28173f58a5 --- /dev/null +++ b/test/built-ins/RegExp/unicodeSets/character-property-escape-union-character-property-escape.js @@ -0,0 +1,51 @@ +// Copyright 2022 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Extended character classes enabled by the RegExp `v` flag support + properties of strings, string literals, and set operations +info: | + Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests + Unicode v14.0.0 +esid: sec-patterns +features: [regexp-unicode-property-escapes, regexp-v-flag] +includes: [regExpUtils.js] +---*/ + +testExtendedCharacterClass({ + regExp: /^[\p{ASCII_Hex_Digit}\p{ASCII_Hex_Digit}]+$/v, + expression: "[\p{ASCII_Hex_Digit}\p{ASCII_Hex_Digit}]", + matchStrings: [ + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9", + "A", + "B", + "C", + "D", + "E", + "F", + "a", + "b", + "c", + "d", + "e", + "f" + ], + nonMatchStrings: [ + "6\uFE0F\u20E3", + "9\uFE0F\u20E3", + "\u2603", + "\u{1D306}", + "\u{1F1E7}\u{1F1EA}" + ], +}); diff --git a/test/built-ins/RegExp/unicodeSets/character-property-escape-union-character.js b/test/built-ins/RegExp/unicodeSets/character-property-escape-union-character.js new file mode 100644 index 0000000000..663fc7a801 --- /dev/null +++ b/test/built-ins/RegExp/unicodeSets/character-property-escape-union-character.js @@ -0,0 +1,52 @@ +// Copyright 2022 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Extended character classes enabled by the RegExp `v` flag support + properties of strings, string literals, and set operations +info: | + Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests + Unicode v14.0.0 +esid: sec-patterns +features: [regexp-unicode-property-escapes, regexp-v-flag] +includes: [regExpUtils.js] +---*/ + +testExtendedCharacterClass({ + regExp: /^[\p{ASCII_Hex_Digit}_]+$/v, + expression: "[\p{ASCII_Hex_Digit}_]", + matchStrings: [ + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9", + "A", + "B", + "C", + "D", + "E", + "F", + "_", + "a", + "b", + "c", + "d", + "e", + "f" + ], + nonMatchStrings: [ + "6\uFE0F\u20E3", + "9\uFE0F\u20E3", + "\u2603", + "\u{1D306}", + "\u{1F1E7}\u{1F1EA}" + ], +}); diff --git a/test/built-ins/RegExp/unicodeSets/character-property-escape-union-property-of-strings-escape.js b/test/built-ins/RegExp/unicodeSets/character-property-escape-union-property-of-strings-escape.js new file mode 100644 index 0000000000..2297b4f4bc --- /dev/null +++ b/test/built-ins/RegExp/unicodeSets/character-property-escape-union-property-of-strings-escape.js @@ -0,0 +1,61 @@ +// Copyright 2022 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Extended character classes enabled by the RegExp `v` flag support + properties of strings, string literals, and set operations +info: | + Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests + Unicode v14.0.0 +esid: sec-patterns +features: [regexp-unicode-property-escapes, regexp-v-flag] +includes: [regExpUtils.js] +---*/ + +testExtendedCharacterClass({ + regExp: /^[\p{ASCII_Hex_Digit}\p{Emoji_Keycap_Sequence}]+$/v, + expression: "[\p{ASCII_Hex_Digit}\p{Emoji_Keycap_Sequence}]", + matchStrings: [ + "#\uFE0F\u20E3", + "*\uFE0F\u20E3", + "0", + "0\uFE0F\u20E3", + "1", + "1\uFE0F\u20E3", + "2", + "2\uFE0F\u20E3", + "3", + "3\uFE0F\u20E3", + "4", + "4\uFE0F\u20E3", + "5", + "5\uFE0F\u20E3", + "6", + "6\uFE0F\u20E3", + "7", + "7\uFE0F\u20E3", + "8", + "8\uFE0F\u20E3", + "9", + "9\uFE0F\u20E3", + "A", + "B", + "C", + "D", + "E", + "F", + "a", + "b", + "c", + "d", + "e", + "f" + ], + nonMatchStrings: [ + "\u2603", + "\u{1D306}", + "\u{1F1E7}\u{1F1EA}" + ], +}); diff --git a/test/built-ins/RegExp/unicodeSets/character-property-escape-union-string-literal.js b/test/built-ins/RegExp/unicodeSets/character-property-escape-union-string-literal.js new file mode 100644 index 0000000000..14b7921a53 --- /dev/null +++ b/test/built-ins/RegExp/unicodeSets/character-property-escape-union-string-literal.js @@ -0,0 +1,51 @@ +// Copyright 2022 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Extended character classes enabled by the RegExp `v` flag support + properties of strings, string literals, and set operations +info: | + Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests + Unicode v14.0.0 +esid: sec-patterns +features: [regexp-unicode-property-escapes, regexp-v-flag] +includes: [regExpUtils.js] +---*/ + +testExtendedCharacterClass({ + regExp: /^[\p{ASCII_Hex_Digit}\q{0|2|4|9\uFE0F\u20E3}]+$/v, + expression: "[\p{ASCII_Hex_Digit}\q{0|2|4|9\uFE0F\u20E3}]", + matchStrings: [ + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9", + "9\uFE0F\u20E3", + "A", + "B", + "C", + "D", + "E", + "F", + "a", + "b", + "c", + "d", + "e", + "f" + ], + nonMatchStrings: [ + "6\uFE0F\u20E3", + "\u2603", + "\u{1D306}", + "\u{1F1E7}\u{1F1EA}" + ], +}); diff --git a/test/built-ins/RegExp/unicodeSets/character-union-character-class-escape.js b/test/built-ins/RegExp/unicodeSets/character-union-character-class-escape.js new file mode 100644 index 0000000000..5be03e5369 --- /dev/null +++ b/test/built-ins/RegExp/unicodeSets/character-union-character-class-escape.js @@ -0,0 +1,41 @@ +// Copyright 2022 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Extended character classes enabled by the RegExp `v` flag support + properties of strings, string literals, and set operations +info: | + Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests + Unicode v14.0.0 +esid: sec-patterns +features: [regexp-v-flag] +includes: [regExpUtils.js] +---*/ + +testExtendedCharacterClass({ + regExp: /^[_\d]+$/v, + expression: "[_\d]", + matchStrings: [ + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9", + "_" + ], + nonMatchStrings: [ + "6\uFE0F\u20E3", + "9\uFE0F\u20E3", + "C", + "\u2603", + "\u{1D306}", + "\u{1F1E7}\u{1F1EA}" + ], +}); diff --git a/test/built-ins/RegExp/unicodeSets/character-union-character-class.js b/test/built-ins/RegExp/unicodeSets/character-union-character-class.js new file mode 100644 index 0000000000..6ccf45aede --- /dev/null +++ b/test/built-ins/RegExp/unicodeSets/character-union-character-class.js @@ -0,0 +1,41 @@ +// Copyright 2022 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Extended character classes enabled by the RegExp `v` flag support + properties of strings, string literals, and set operations +info: | + Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests + Unicode v14.0.0 +esid: sec-patterns +features: [regexp-v-flag] +includes: [regExpUtils.js] +---*/ + +testExtendedCharacterClass({ + regExp: /^[_[0-9]]+$/v, + expression: "[_[0-9]]", + matchStrings: [ + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9", + "_" + ], + nonMatchStrings: [ + "6\uFE0F\u20E3", + "9\uFE0F\u20E3", + "C", + "\u2603", + "\u{1D306}", + "\u{1F1E7}\u{1F1EA}" + ], +}); diff --git a/test/built-ins/RegExp/unicodeSets/character-union-character-property-escape.js b/test/built-ins/RegExp/unicodeSets/character-union-character-property-escape.js new file mode 100644 index 0000000000..64e33ce923 --- /dev/null +++ b/test/built-ins/RegExp/unicodeSets/character-union-character-property-escape.js @@ -0,0 +1,52 @@ +// Copyright 2022 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Extended character classes enabled by the RegExp `v` flag support + properties of strings, string literals, and set operations +info: | + Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests + Unicode v14.0.0 +esid: sec-patterns +features: [regexp-unicode-property-escapes, regexp-v-flag] +includes: [regExpUtils.js] +---*/ + +testExtendedCharacterClass({ + regExp: /^[_\p{ASCII_Hex_Digit}]+$/v, + expression: "[_\p{ASCII_Hex_Digit}]", + matchStrings: [ + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9", + "A", + "B", + "C", + "D", + "E", + "F", + "_", + "a", + "b", + "c", + "d", + "e", + "f" + ], + nonMatchStrings: [ + "6\uFE0F\u20E3", + "9\uFE0F\u20E3", + "\u2603", + "\u{1D306}", + "\u{1F1E7}\u{1F1EA}" + ], +}); diff --git a/test/built-ins/RegExp/unicodeSets/character-union-character.js b/test/built-ins/RegExp/unicodeSets/character-union-character.js new file mode 100644 index 0000000000..46e2f5eac7 --- /dev/null +++ b/test/built-ins/RegExp/unicodeSets/character-union-character.js @@ -0,0 +1,32 @@ +// Copyright 2022 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Extended character classes enabled by the RegExp `v` flag support + properties of strings, string literals, and set operations +info: | + Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests + Unicode v14.0.0 +esid: sec-patterns +features: [regexp-v-flag] +includes: [regExpUtils.js] +---*/ + +testExtendedCharacterClass({ + regExp: /^[__]+$/v, + expression: "[__]", + matchStrings: [ + "_" + ], + nonMatchStrings: [ + "6\uFE0F\u20E3", + "7", + "9\uFE0F\u20E3", + "C", + "\u2603", + "\u{1D306}", + "\u{1F1E7}\u{1F1EA}" + ], +}); diff --git a/test/built-ins/RegExp/unicodeSets/character-union-property-of-strings-escape.js b/test/built-ins/RegExp/unicodeSets/character-union-property-of-strings-escape.js new file mode 100644 index 0000000000..60cb484fc7 --- /dev/null +++ b/test/built-ins/RegExp/unicodeSets/character-union-property-of-strings-escape.js @@ -0,0 +1,42 @@ +// Copyright 2022 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Extended character classes enabled by the RegExp `v` flag support + properties of strings, string literals, and set operations +info: | + Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests + Unicode v14.0.0 +esid: sec-patterns +features: [regexp-unicode-property-escapes, regexp-v-flag] +includes: [regExpUtils.js] +---*/ + +testExtendedCharacterClass({ + regExp: /^[_\p{Emoji_Keycap_Sequence}]+$/v, + expression: "[_\p{Emoji_Keycap_Sequence}]", + matchStrings: [ + "#\uFE0F\u20E3", + "*\uFE0F\u20E3", + "0\uFE0F\u20E3", + "1\uFE0F\u20E3", + "2\uFE0F\u20E3", + "3\uFE0F\u20E3", + "4\uFE0F\u20E3", + "5\uFE0F\u20E3", + "6\uFE0F\u20E3", + "7\uFE0F\u20E3", + "8\uFE0F\u20E3", + "9\uFE0F\u20E3", + "_" + ], + nonMatchStrings: [ + "7", + "C", + "\u2603", + "\u{1D306}", + "\u{1F1E7}\u{1F1EA}" + ], +}); diff --git a/test/built-ins/RegExp/unicodeSets/character-union-string-literal.js b/test/built-ins/RegExp/unicodeSets/character-union-string-literal.js new file mode 100644 index 0000000000..2be3f1a6b8 --- /dev/null +++ b/test/built-ins/RegExp/unicodeSets/character-union-string-literal.js @@ -0,0 +1,35 @@ +// Copyright 2022 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Extended character classes enabled by the RegExp `v` flag support + properties of strings, string literals, and set operations +info: | + Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests + Unicode v14.0.0 +esid: sec-patterns +features: [regexp-v-flag] +includes: [regExpUtils.js] +---*/ + +testExtendedCharacterClass({ + regExp: /^[_\q{0|2|4|9\uFE0F\u20E3}]+$/v, + expression: "[_\q{0|2|4|9\uFE0F\u20E3}]", + matchStrings: [ + "0", + "2", + "4", + "9\uFE0F\u20E3", + "_" + ], + nonMatchStrings: [ + "6\uFE0F\u20E3", + "7", + "C", + "\u2603", + "\u{1D306}", + "\u{1F1E7}\u{1F1EA}" + ], +}); diff --git a/test/built-ins/RegExp/unicodeSets/property-of-strings-escape-difference-character-class-escape.js b/test/built-ins/RegExp/unicodeSets/property-of-strings-escape-difference-character-class-escape.js new file mode 100644 index 0000000000..cd7fd07ec6 --- /dev/null +++ b/test/built-ins/RegExp/unicodeSets/property-of-strings-escape-difference-character-class-escape.js @@ -0,0 +1,41 @@ +// Copyright 2022 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Extended character classes enabled by the RegExp `v` flag support + properties of strings, string literals, and set operations +info: | + Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests + Unicode v14.0.0 +esid: sec-patterns +features: [regexp-unicode-property-escapes, regexp-v-flag] +includes: [regExpUtils.js] +---*/ + +testExtendedCharacterClass({ + regExp: /^[\p{Emoji_Keycap_Sequence}--\d]+$/v, + expression: "[\p{Emoji_Keycap_Sequence}--\d]", + matchStrings: [ + "#\uFE0F\u20E3", + "*\uFE0F\u20E3", + "0\uFE0F\u20E3", + "1\uFE0F\u20E3", + "2\uFE0F\u20E3", + "3\uFE0F\u20E3", + "4\uFE0F\u20E3", + "5\uFE0F\u20E3", + "6\uFE0F\u20E3", + "7\uFE0F\u20E3", + "8\uFE0F\u20E3", + "9\uFE0F\u20E3" + ], + nonMatchStrings: [ + "7", + "C", + "\u2603", + "\u{1D306}", + "\u{1F1E7}\u{1F1EA}" + ], +}); diff --git a/test/built-ins/RegExp/unicodeSets/property-of-strings-escape-difference-character-class.js b/test/built-ins/RegExp/unicodeSets/property-of-strings-escape-difference-character-class.js new file mode 100644 index 0000000000..dc0887e403 --- /dev/null +++ b/test/built-ins/RegExp/unicodeSets/property-of-strings-escape-difference-character-class.js @@ -0,0 +1,41 @@ +// Copyright 2022 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Extended character classes enabled by the RegExp `v` flag support + properties of strings, string literals, and set operations +info: | + Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests + Unicode v14.0.0 +esid: sec-patterns +features: [regexp-unicode-property-escapes, regexp-v-flag] +includes: [regExpUtils.js] +---*/ + +testExtendedCharacterClass({ + regExp: /^[\p{Emoji_Keycap_Sequence}--[0-9]]+$/v, + expression: "[\p{Emoji_Keycap_Sequence}--[0-9]]", + matchStrings: [ + "#\uFE0F\u20E3", + "*\uFE0F\u20E3", + "0\uFE0F\u20E3", + "1\uFE0F\u20E3", + "2\uFE0F\u20E3", + "3\uFE0F\u20E3", + "4\uFE0F\u20E3", + "5\uFE0F\u20E3", + "6\uFE0F\u20E3", + "7\uFE0F\u20E3", + "8\uFE0F\u20E3", + "9\uFE0F\u20E3" + ], + nonMatchStrings: [ + "7", + "C", + "\u2603", + "\u{1D306}", + "\u{1F1E7}\u{1F1EA}" + ], +}); diff --git a/test/built-ins/RegExp/unicodeSets/property-of-strings-escape-difference-character-property-escape.js b/test/built-ins/RegExp/unicodeSets/property-of-strings-escape-difference-character-property-escape.js new file mode 100644 index 0000000000..b324ea8b87 --- /dev/null +++ b/test/built-ins/RegExp/unicodeSets/property-of-strings-escape-difference-character-property-escape.js @@ -0,0 +1,41 @@ +// Copyright 2022 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Extended character classes enabled by the RegExp `v` flag support + properties of strings, string literals, and set operations +info: | + Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests + Unicode v14.0.0 +esid: sec-patterns +features: [regexp-unicode-property-escapes, regexp-v-flag] +includes: [regExpUtils.js] +---*/ + +testExtendedCharacterClass({ + regExp: /^[\p{Emoji_Keycap_Sequence}--\p{ASCII_Hex_Digit}]+$/v, + expression: "[\p{Emoji_Keycap_Sequence}--\p{ASCII_Hex_Digit}]", + matchStrings: [ + "#\uFE0F\u20E3", + "*\uFE0F\u20E3", + "0\uFE0F\u20E3", + "1\uFE0F\u20E3", + "2\uFE0F\u20E3", + "3\uFE0F\u20E3", + "4\uFE0F\u20E3", + "5\uFE0F\u20E3", + "6\uFE0F\u20E3", + "7\uFE0F\u20E3", + "8\uFE0F\u20E3", + "9\uFE0F\u20E3" + ], + nonMatchStrings: [ + "7", + "C", + "\u2603", + "\u{1D306}", + "\u{1F1E7}\u{1F1EA}" + ], +}); diff --git a/test/built-ins/RegExp/unicodeSets/property-of-strings-escape-difference-character.js b/test/built-ins/RegExp/unicodeSets/property-of-strings-escape-difference-character.js new file mode 100644 index 0000000000..5aedb51b10 --- /dev/null +++ b/test/built-ins/RegExp/unicodeSets/property-of-strings-escape-difference-character.js @@ -0,0 +1,41 @@ +// Copyright 2022 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Extended character classes enabled by the RegExp `v` flag support + properties of strings, string literals, and set operations +info: | + Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests + Unicode v14.0.0 +esid: sec-patterns +features: [regexp-unicode-property-escapes, regexp-v-flag] +includes: [regExpUtils.js] +---*/ + +testExtendedCharacterClass({ + regExp: /^[\p{Emoji_Keycap_Sequence}--_]+$/v, + expression: "[\p{Emoji_Keycap_Sequence}--_]", + matchStrings: [ + "#\uFE0F\u20E3", + "*\uFE0F\u20E3", + "0\uFE0F\u20E3", + "1\uFE0F\u20E3", + "2\uFE0F\u20E3", + "3\uFE0F\u20E3", + "4\uFE0F\u20E3", + "5\uFE0F\u20E3", + "6\uFE0F\u20E3", + "7\uFE0F\u20E3", + "8\uFE0F\u20E3", + "9\uFE0F\u20E3" + ], + nonMatchStrings: [ + "7", + "C", + "\u2603", + "\u{1D306}", + "\u{1F1E7}\u{1F1EA}" + ], +}); diff --git a/test/built-ins/RegExp/unicodeSets/property-of-strings-escape-difference-property-of-strings-escape.js b/test/built-ins/RegExp/unicodeSets/property-of-strings-escape-difference-property-of-strings-escape.js new file mode 100644 index 0000000000..7a77bf73e3 --- /dev/null +++ b/test/built-ins/RegExp/unicodeSets/property-of-strings-escape-difference-property-of-strings-escape.js @@ -0,0 +1,42 @@ +// Copyright 2022 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Extended character classes enabled by the RegExp `v` flag support + properties of strings, string literals, and set operations +info: | + Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests + Unicode v14.0.0 +esid: sec-patterns +features: [regexp-unicode-property-escapes, regexp-v-flag] +includes: [regExpUtils.js] +---*/ + +testExtendedCharacterClass({ + regExp: /^[\p{Emoji_Keycap_Sequence}--\p{Emoji_Keycap_Sequence}]+$/v, + expression: "[\p{Emoji_Keycap_Sequence}--\p{Emoji_Keycap_Sequence}]", + matchStrings: [], + nonMatchStrings: [ + "#\uFE0F\u20E3", + "*\uFE0F\u20E3", + "0\uFE0F\u20E3", + "1\uFE0F\u20E3", + "2\uFE0F\u20E3", + "3\uFE0F\u20E3", + "4\uFE0F\u20E3", + "5\uFE0F\u20E3", + "6\uFE0F\u20E3", + "6\uFE0F\u20E3", + "7", + "7\uFE0F\u20E3", + "8\uFE0F\u20E3", + "9\uFE0F\u20E3", + "9\uFE0F\u20E3", + "C", + "\u2603", + "\u{1D306}", + "\u{1F1E7}\u{1F1EA}" + ], +}); diff --git a/test/built-ins/RegExp/unicodeSets/property-of-strings-escape-difference-string-literal.js b/test/built-ins/RegExp/unicodeSets/property-of-strings-escape-difference-string-literal.js new file mode 100644 index 0000000000..823e599ce9 --- /dev/null +++ b/test/built-ins/RegExp/unicodeSets/property-of-strings-escape-difference-string-literal.js @@ -0,0 +1,42 @@ +// Copyright 2022 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Extended character classes enabled by the RegExp `v` flag support + properties of strings, string literals, and set operations +info: | + Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests + Unicode v14.0.0 +esid: sec-patterns +features: [regexp-unicode-property-escapes, regexp-v-flag] +includes: [regExpUtils.js] +---*/ + +testExtendedCharacterClass({ + regExp: /^[\p{Emoji_Keycap_Sequence}--\q{0|2|4|9\uFE0F\u20E3}]+$/v, + expression: "[\p{Emoji_Keycap_Sequence}--\q{0|2|4|9\uFE0F\u20E3}]", + matchStrings: [ + "#\uFE0F\u20E3", + "*\uFE0F\u20E3", + "0\uFE0F\u20E3", + "1\uFE0F\u20E3", + "2\uFE0F\u20E3", + "3\uFE0F\u20E3", + "4\uFE0F\u20E3", + "5\uFE0F\u20E3", + "6\uFE0F\u20E3", + "7\uFE0F\u20E3", + "8\uFE0F\u20E3" + ], + nonMatchStrings: [ + "7", + "9\uFE0F\u20E3", + "9\uFE0F\u20E3", + "C", + "\u2603", + "\u{1D306}", + "\u{1F1E7}\u{1F1EA}" + ], +}); diff --git a/test/built-ins/RegExp/unicodeSets/property-of-strings-escape-intersection-character-class-escape.js b/test/built-ins/RegExp/unicodeSets/property-of-strings-escape-intersection-character-class-escape.js new file mode 100644 index 0000000000..7d0267bc14 --- /dev/null +++ b/test/built-ins/RegExp/unicodeSets/property-of-strings-escape-intersection-character-class-escape.js @@ -0,0 +1,42 @@ +// Copyright 2022 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Extended character classes enabled by the RegExp `v` flag support + properties of strings, string literals, and set operations +info: | + Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests + Unicode v14.0.0 +esid: sec-patterns +features: [regexp-unicode-property-escapes, regexp-v-flag] +includes: [regExpUtils.js] +---*/ + +testExtendedCharacterClass({ + regExp: /^[\p{Emoji_Keycap_Sequence}&&\d]+$/v, + expression: "[\p{Emoji_Keycap_Sequence}&&\d]", + matchStrings: [], + nonMatchStrings: [ + "#\uFE0F\u20E3", + "*\uFE0F\u20E3", + "0\uFE0F\u20E3", + "1\uFE0F\u20E3", + "2\uFE0F\u20E3", + "3\uFE0F\u20E3", + "4\uFE0F\u20E3", + "5\uFE0F\u20E3", + "6\uFE0F\u20E3", + "6\uFE0F\u20E3", + "7", + "7\uFE0F\u20E3", + "8\uFE0F\u20E3", + "9\uFE0F\u20E3", + "9\uFE0F\u20E3", + "C", + "\u2603", + "\u{1D306}", + "\u{1F1E7}\u{1F1EA}" + ], +}); diff --git a/test/built-ins/RegExp/unicodeSets/property-of-strings-escape-intersection-character-class.js b/test/built-ins/RegExp/unicodeSets/property-of-strings-escape-intersection-character-class.js new file mode 100644 index 0000000000..603a547402 --- /dev/null +++ b/test/built-ins/RegExp/unicodeSets/property-of-strings-escape-intersection-character-class.js @@ -0,0 +1,42 @@ +// Copyright 2022 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Extended character classes enabled by the RegExp `v` flag support + properties of strings, string literals, and set operations +info: | + Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests + Unicode v14.0.0 +esid: sec-patterns +features: [regexp-unicode-property-escapes, regexp-v-flag] +includes: [regExpUtils.js] +---*/ + +testExtendedCharacterClass({ + regExp: /^[\p{Emoji_Keycap_Sequence}&&[0-9]]+$/v, + expression: "[\p{Emoji_Keycap_Sequence}&&[0-9]]", + matchStrings: [], + nonMatchStrings: [ + "#\uFE0F\u20E3", + "*\uFE0F\u20E3", + "0\uFE0F\u20E3", + "1\uFE0F\u20E3", + "2\uFE0F\u20E3", + "3\uFE0F\u20E3", + "4\uFE0F\u20E3", + "5\uFE0F\u20E3", + "6\uFE0F\u20E3", + "6\uFE0F\u20E3", + "7", + "7\uFE0F\u20E3", + "8\uFE0F\u20E3", + "9\uFE0F\u20E3", + "9\uFE0F\u20E3", + "C", + "\u2603", + "\u{1D306}", + "\u{1F1E7}\u{1F1EA}" + ], +}); diff --git a/test/built-ins/RegExp/unicodeSets/property-of-strings-escape-intersection-character-property-escape.js b/test/built-ins/RegExp/unicodeSets/property-of-strings-escape-intersection-character-property-escape.js new file mode 100644 index 0000000000..3903927a1e --- /dev/null +++ b/test/built-ins/RegExp/unicodeSets/property-of-strings-escape-intersection-character-property-escape.js @@ -0,0 +1,42 @@ +// Copyright 2022 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Extended character classes enabled by the RegExp `v` flag support + properties of strings, string literals, and set operations +info: | + Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests + Unicode v14.0.0 +esid: sec-patterns +features: [regexp-unicode-property-escapes, regexp-v-flag] +includes: [regExpUtils.js] +---*/ + +testExtendedCharacterClass({ + regExp: /^[\p{Emoji_Keycap_Sequence}&&\p{ASCII_Hex_Digit}]+$/v, + expression: "[\p{Emoji_Keycap_Sequence}&&\p{ASCII_Hex_Digit}]", + matchStrings: [], + nonMatchStrings: [ + "#\uFE0F\u20E3", + "*\uFE0F\u20E3", + "0\uFE0F\u20E3", + "1\uFE0F\u20E3", + "2\uFE0F\u20E3", + "3\uFE0F\u20E3", + "4\uFE0F\u20E3", + "5\uFE0F\u20E3", + "6\uFE0F\u20E3", + "6\uFE0F\u20E3", + "7", + "7\uFE0F\u20E3", + "8\uFE0F\u20E3", + "9\uFE0F\u20E3", + "9\uFE0F\u20E3", + "C", + "\u2603", + "\u{1D306}", + "\u{1F1E7}\u{1F1EA}" + ], +}); diff --git a/test/built-ins/RegExp/unicodeSets/property-of-strings-escape-intersection-character.js b/test/built-ins/RegExp/unicodeSets/property-of-strings-escape-intersection-character.js new file mode 100644 index 0000000000..73ca95e744 --- /dev/null +++ b/test/built-ins/RegExp/unicodeSets/property-of-strings-escape-intersection-character.js @@ -0,0 +1,42 @@ +// Copyright 2022 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Extended character classes enabled by the RegExp `v` flag support + properties of strings, string literals, and set operations +info: | + Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests + Unicode v14.0.0 +esid: sec-patterns +features: [regexp-unicode-property-escapes, regexp-v-flag] +includes: [regExpUtils.js] +---*/ + +testExtendedCharacterClass({ + regExp: /^[\p{Emoji_Keycap_Sequence}&&_]+$/v, + expression: "[\p{Emoji_Keycap_Sequence}&&_]", + matchStrings: [], + nonMatchStrings: [ + "#\uFE0F\u20E3", + "*\uFE0F\u20E3", + "0\uFE0F\u20E3", + "1\uFE0F\u20E3", + "2\uFE0F\u20E3", + "3\uFE0F\u20E3", + "4\uFE0F\u20E3", + "5\uFE0F\u20E3", + "6\uFE0F\u20E3", + "6\uFE0F\u20E3", + "7", + "7\uFE0F\u20E3", + "8\uFE0F\u20E3", + "9\uFE0F\u20E3", + "9\uFE0F\u20E3", + "C", + "\u2603", + "\u{1D306}", + "\u{1F1E7}\u{1F1EA}" + ], +}); diff --git a/test/built-ins/RegExp/unicodeSets/property-of-strings-escape-intersection-property-of-strings-escape.js b/test/built-ins/RegExp/unicodeSets/property-of-strings-escape-intersection-property-of-strings-escape.js new file mode 100644 index 0000000000..4e810d322b --- /dev/null +++ b/test/built-ins/RegExp/unicodeSets/property-of-strings-escape-intersection-property-of-strings-escape.js @@ -0,0 +1,41 @@ +// Copyright 2022 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Extended character classes enabled by the RegExp `v` flag support + properties of strings, string literals, and set operations +info: | + Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests + Unicode v14.0.0 +esid: sec-patterns +features: [regexp-unicode-property-escapes, regexp-v-flag] +includes: [regExpUtils.js] +---*/ + +testExtendedCharacterClass({ + regExp: /^[\p{Emoji_Keycap_Sequence}&&\p{Emoji_Keycap_Sequence}]+$/v, + expression: "[\p{Emoji_Keycap_Sequence}&&\p{Emoji_Keycap_Sequence}]", + matchStrings: [ + "#\uFE0F\u20E3", + "*\uFE0F\u20E3", + "0\uFE0F\u20E3", + "1\uFE0F\u20E3", + "2\uFE0F\u20E3", + "3\uFE0F\u20E3", + "4\uFE0F\u20E3", + "5\uFE0F\u20E3", + "6\uFE0F\u20E3", + "7\uFE0F\u20E3", + "8\uFE0F\u20E3", + "9\uFE0F\u20E3" + ], + nonMatchStrings: [ + "7", + "C", + "\u2603", + "\u{1D306}", + "\u{1F1E7}\u{1F1EA}" + ], +}); diff --git a/test/built-ins/RegExp/unicodeSets/property-of-strings-escape-intersection-string-literal.js b/test/built-ins/RegExp/unicodeSets/property-of-strings-escape-intersection-string-literal.js new file mode 100644 index 0000000000..1369e97e0c --- /dev/null +++ b/test/built-ins/RegExp/unicodeSets/property-of-strings-escape-intersection-string-literal.js @@ -0,0 +1,42 @@ +// Copyright 2022 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Extended character classes enabled by the RegExp `v` flag support + properties of strings, string literals, and set operations +info: | + Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests + Unicode v14.0.0 +esid: sec-patterns +features: [regexp-unicode-property-escapes, regexp-v-flag] +includes: [regExpUtils.js] +---*/ + +testExtendedCharacterClass({ + regExp: /^[\p{Emoji_Keycap_Sequence}&&\q{0|2|4|9\uFE0F\u20E3}]+$/v, + expression: "[\p{Emoji_Keycap_Sequence}&&\q{0|2|4|9\uFE0F\u20E3}]", + matchStrings: [ + "9\uFE0F\u20E3" + ], + nonMatchStrings: [ + "#\uFE0F\u20E3", + "*\uFE0F\u20E3", + "0\uFE0F\u20E3", + "1\uFE0F\u20E3", + "2\uFE0F\u20E3", + "3\uFE0F\u20E3", + "4\uFE0F\u20E3", + "5\uFE0F\u20E3", + "6\uFE0F\u20E3", + "6\uFE0F\u20E3", + "7", + "7\uFE0F\u20E3", + "8\uFE0F\u20E3", + "C", + "\u2603", + "\u{1D306}", + "\u{1F1E7}\u{1F1EA}" + ], +}); diff --git a/test/built-ins/RegExp/unicodeSets/property-of-strings-escape-union-character-class-escape.js b/test/built-ins/RegExp/unicodeSets/property-of-strings-escape-union-character-class-escape.js new file mode 100644 index 0000000000..672d3aaa11 --- /dev/null +++ b/test/built-ins/RegExp/unicodeSets/property-of-strings-escape-union-character-class-escape.js @@ -0,0 +1,50 @@ +// Copyright 2022 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Extended character classes enabled by the RegExp `v` flag support + properties of strings, string literals, and set operations +info: | + Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests + Unicode v14.0.0 +esid: sec-patterns +features: [regexp-unicode-property-escapes, regexp-v-flag] +includes: [regExpUtils.js] +---*/ + +testExtendedCharacterClass({ + regExp: /^[\p{Emoji_Keycap_Sequence}\d]+$/v, + expression: "[\p{Emoji_Keycap_Sequence}\d]", + matchStrings: [ + "#\uFE0F\u20E3", + "*\uFE0F\u20E3", + "0", + "0\uFE0F\u20E3", + "1", + "1\uFE0F\u20E3", + "2", + "2\uFE0F\u20E3", + "3", + "3\uFE0F\u20E3", + "4", + "4\uFE0F\u20E3", + "5", + "5\uFE0F\u20E3", + "6", + "6\uFE0F\u20E3", + "7", + "7\uFE0F\u20E3", + "8", + "8\uFE0F\u20E3", + "9", + "9\uFE0F\u20E3" + ], + nonMatchStrings: [ + "C", + "\u2603", + "\u{1D306}", + "\u{1F1E7}\u{1F1EA}" + ], +}); diff --git a/test/built-ins/RegExp/unicodeSets/property-of-strings-escape-union-character-class.js b/test/built-ins/RegExp/unicodeSets/property-of-strings-escape-union-character-class.js new file mode 100644 index 0000000000..29e410089d --- /dev/null +++ b/test/built-ins/RegExp/unicodeSets/property-of-strings-escape-union-character-class.js @@ -0,0 +1,50 @@ +// Copyright 2022 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Extended character classes enabled by the RegExp `v` flag support + properties of strings, string literals, and set operations +info: | + Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests + Unicode v14.0.0 +esid: sec-patterns +features: [regexp-unicode-property-escapes, regexp-v-flag] +includes: [regExpUtils.js] +---*/ + +testExtendedCharacterClass({ + regExp: /^[\p{Emoji_Keycap_Sequence}[0-9]]+$/v, + expression: "[\p{Emoji_Keycap_Sequence}[0-9]]", + matchStrings: [ + "#\uFE0F\u20E3", + "*\uFE0F\u20E3", + "0", + "0\uFE0F\u20E3", + "1", + "1\uFE0F\u20E3", + "2", + "2\uFE0F\u20E3", + "3", + "3\uFE0F\u20E3", + "4", + "4\uFE0F\u20E3", + "5", + "5\uFE0F\u20E3", + "6", + "6\uFE0F\u20E3", + "7", + "7\uFE0F\u20E3", + "8", + "8\uFE0F\u20E3", + "9", + "9\uFE0F\u20E3" + ], + nonMatchStrings: [ + "C", + "\u2603", + "\u{1D306}", + "\u{1F1E7}\u{1F1EA}" + ], +}); diff --git a/test/built-ins/RegExp/unicodeSets/property-of-strings-escape-union-character-property-escape.js b/test/built-ins/RegExp/unicodeSets/property-of-strings-escape-union-character-property-escape.js new file mode 100644 index 0000000000..4ab194bb19 --- /dev/null +++ b/test/built-ins/RegExp/unicodeSets/property-of-strings-escape-union-character-property-escape.js @@ -0,0 +1,61 @@ +// Copyright 2022 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Extended character classes enabled by the RegExp `v` flag support + properties of strings, string literals, and set operations +info: | + Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests + Unicode v14.0.0 +esid: sec-patterns +features: [regexp-unicode-property-escapes, regexp-v-flag] +includes: [regExpUtils.js] +---*/ + +testExtendedCharacterClass({ + regExp: /^[\p{Emoji_Keycap_Sequence}\p{ASCII_Hex_Digit}]+$/v, + expression: "[\p{Emoji_Keycap_Sequence}\p{ASCII_Hex_Digit}]", + matchStrings: [ + "#\uFE0F\u20E3", + "*\uFE0F\u20E3", + "0", + "0\uFE0F\u20E3", + "1", + "1\uFE0F\u20E3", + "2", + "2\uFE0F\u20E3", + "3", + "3\uFE0F\u20E3", + "4", + "4\uFE0F\u20E3", + "5", + "5\uFE0F\u20E3", + "6", + "6\uFE0F\u20E3", + "7", + "7\uFE0F\u20E3", + "8", + "8\uFE0F\u20E3", + "9", + "9\uFE0F\u20E3", + "A", + "B", + "C", + "D", + "E", + "F", + "a", + "b", + "c", + "d", + "e", + "f" + ], + nonMatchStrings: [ + "\u2603", + "\u{1D306}", + "\u{1F1E7}\u{1F1EA}" + ], +}); diff --git a/test/built-ins/RegExp/unicodeSets/property-of-strings-escape-union-character.js b/test/built-ins/RegExp/unicodeSets/property-of-strings-escape-union-character.js new file mode 100644 index 0000000000..a219d6dc7b --- /dev/null +++ b/test/built-ins/RegExp/unicodeSets/property-of-strings-escape-union-character.js @@ -0,0 +1,42 @@ +// Copyright 2022 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Extended character classes enabled by the RegExp `v` flag support + properties of strings, string literals, and set operations +info: | + Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests + Unicode v14.0.0 +esid: sec-patterns +features: [regexp-unicode-property-escapes, regexp-v-flag] +includes: [regExpUtils.js] +---*/ + +testExtendedCharacterClass({ + regExp: /^[\p{Emoji_Keycap_Sequence}_]+$/v, + expression: "[\p{Emoji_Keycap_Sequence}_]", + matchStrings: [ + "#\uFE0F\u20E3", + "*\uFE0F\u20E3", + "0\uFE0F\u20E3", + "1\uFE0F\u20E3", + "2\uFE0F\u20E3", + "3\uFE0F\u20E3", + "4\uFE0F\u20E3", + "5\uFE0F\u20E3", + "6\uFE0F\u20E3", + "7\uFE0F\u20E3", + "8\uFE0F\u20E3", + "9\uFE0F\u20E3", + "_" + ], + nonMatchStrings: [ + "7", + "C", + "\u2603", + "\u{1D306}", + "\u{1F1E7}\u{1F1EA}" + ], +}); diff --git a/test/built-ins/RegExp/unicodeSets/property-of-strings-escape-union-property-of-strings-escape.js b/test/built-ins/RegExp/unicodeSets/property-of-strings-escape-union-property-of-strings-escape.js new file mode 100644 index 0000000000..755211e0d5 --- /dev/null +++ b/test/built-ins/RegExp/unicodeSets/property-of-strings-escape-union-property-of-strings-escape.js @@ -0,0 +1,41 @@ +// Copyright 2022 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Extended character classes enabled by the RegExp `v` flag support + properties of strings, string literals, and set operations +info: | + Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests + Unicode v14.0.0 +esid: sec-patterns +features: [regexp-unicode-property-escapes, regexp-v-flag] +includes: [regExpUtils.js] +---*/ + +testExtendedCharacterClass({ + regExp: /^[\p{Emoji_Keycap_Sequence}\p{Emoji_Keycap_Sequence}]+$/v, + expression: "[\p{Emoji_Keycap_Sequence}\p{Emoji_Keycap_Sequence}]", + matchStrings: [ + "#\uFE0F\u20E3", + "*\uFE0F\u20E3", + "0\uFE0F\u20E3", + "1\uFE0F\u20E3", + "2\uFE0F\u20E3", + "3\uFE0F\u20E3", + "4\uFE0F\u20E3", + "5\uFE0F\u20E3", + "6\uFE0F\u20E3", + "7\uFE0F\u20E3", + "8\uFE0F\u20E3", + "9\uFE0F\u20E3" + ], + nonMatchStrings: [ + "7", + "C", + "\u2603", + "\u{1D306}", + "\u{1F1E7}\u{1F1EA}" + ], +}); diff --git a/test/built-ins/RegExp/unicodeSets/property-of-strings-escape-union-string-literal.js b/test/built-ins/RegExp/unicodeSets/property-of-strings-escape-union-string-literal.js new file mode 100644 index 0000000000..0fcbca4102 --- /dev/null +++ b/test/built-ins/RegExp/unicodeSets/property-of-strings-escape-union-string-literal.js @@ -0,0 +1,44 @@ +// Copyright 2022 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Extended character classes enabled by the RegExp `v` flag support + properties of strings, string literals, and set operations +info: | + Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests + Unicode v14.0.0 +esid: sec-patterns +features: [regexp-unicode-property-escapes, regexp-v-flag] +includes: [regExpUtils.js] +---*/ + +testExtendedCharacterClass({ + regExp: /^[\p{Emoji_Keycap_Sequence}\q{0|2|4|9\uFE0F\u20E3}]+$/v, + expression: "[\p{Emoji_Keycap_Sequence}\q{0|2|4|9\uFE0F\u20E3}]", + matchStrings: [ + "#\uFE0F\u20E3", + "*\uFE0F\u20E3", + "0", + "0\uFE0F\u20E3", + "1\uFE0F\u20E3", + "2", + "2\uFE0F\u20E3", + "3\uFE0F\u20E3", + "4", + "4\uFE0F\u20E3", + "5\uFE0F\u20E3", + "6\uFE0F\u20E3", + "7\uFE0F\u20E3", + "8\uFE0F\u20E3", + "9\uFE0F\u20E3" + ], + nonMatchStrings: [ + "7", + "C", + "\u2603", + "\u{1D306}", + "\u{1F1E7}\u{1F1EA}" + ], +}); diff --git a/test/built-ins/RegExp/unicodeSets/string-literal-difference-character-class-escape.js b/test/built-ins/RegExp/unicodeSets/string-literal-difference-character-class-escape.js new file mode 100644 index 0000000000..500ee96959 --- /dev/null +++ b/test/built-ins/RegExp/unicodeSets/string-literal-difference-character-class-escape.js @@ -0,0 +1,34 @@ +// Copyright 2022 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Extended character classes enabled by the RegExp `v` flag support + properties of strings, string literals, and set operations +info: | + Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests + Unicode v14.0.0 +esid: sec-patterns +features: [regexp-v-flag] +includes: [regExpUtils.js] +---*/ + +testExtendedCharacterClass({ + regExp: /^[\q{0|2|4|9\uFE0F\u20E3}--\d]+$/v, + expression: "[\q{0|2|4|9\uFE0F\u20E3}--\d]", + matchStrings: [ + "9\uFE0F\u20E3" + ], + nonMatchStrings: [ + "0", + "2", + "4", + "6\uFE0F\u20E3", + "7", + "C", + "\u2603", + "\u{1D306}", + "\u{1F1E7}\u{1F1EA}" + ], +}); diff --git a/test/built-ins/RegExp/unicodeSets/string-literal-difference-character-class.js b/test/built-ins/RegExp/unicodeSets/string-literal-difference-character-class.js new file mode 100644 index 0000000000..f502113601 --- /dev/null +++ b/test/built-ins/RegExp/unicodeSets/string-literal-difference-character-class.js @@ -0,0 +1,34 @@ +// Copyright 2022 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Extended character classes enabled by the RegExp `v` flag support + properties of strings, string literals, and set operations +info: | + Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests + Unicode v14.0.0 +esid: sec-patterns +features: [regexp-v-flag] +includes: [regExpUtils.js] +---*/ + +testExtendedCharacterClass({ + regExp: /^[\q{0|2|4|9\uFE0F\u20E3}--[0-9]]+$/v, + expression: "[\q{0|2|4|9\uFE0F\u20E3}--[0-9]]", + matchStrings: [ + "9\uFE0F\u20E3" + ], + nonMatchStrings: [ + "0", + "2", + "4", + "6\uFE0F\u20E3", + "7", + "C", + "\u2603", + "\u{1D306}", + "\u{1F1E7}\u{1F1EA}" + ], +}); diff --git a/test/built-ins/RegExp/unicodeSets/string-literal-difference-character-property-escape.js b/test/built-ins/RegExp/unicodeSets/string-literal-difference-character-property-escape.js new file mode 100644 index 0000000000..d2ebbce244 --- /dev/null +++ b/test/built-ins/RegExp/unicodeSets/string-literal-difference-character-property-escape.js @@ -0,0 +1,34 @@ +// Copyright 2022 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Extended character classes enabled by the RegExp `v` flag support + properties of strings, string literals, and set operations +info: | + Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests + Unicode v14.0.0 +esid: sec-patterns +features: [regexp-unicode-property-escapes, regexp-v-flag] +includes: [regExpUtils.js] +---*/ + +testExtendedCharacterClass({ + regExp: /^[\q{0|2|4|9\uFE0F\u20E3}--\p{ASCII_Hex_Digit}]+$/v, + expression: "[\q{0|2|4|9\uFE0F\u20E3}--\p{ASCII_Hex_Digit}]", + matchStrings: [ + "9\uFE0F\u20E3" + ], + nonMatchStrings: [ + "0", + "2", + "4", + "6\uFE0F\u20E3", + "7", + "C", + "\u2603", + "\u{1D306}", + "\u{1F1E7}\u{1F1EA}" + ], +}); diff --git a/test/built-ins/RegExp/unicodeSets/string-literal-difference-character.js b/test/built-ins/RegExp/unicodeSets/string-literal-difference-character.js new file mode 100644 index 0000000000..1e2155aa13 --- /dev/null +++ b/test/built-ins/RegExp/unicodeSets/string-literal-difference-character.js @@ -0,0 +1,34 @@ +// Copyright 2022 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Extended character classes enabled by the RegExp `v` flag support + properties of strings, string literals, and set operations +info: | + Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests + Unicode v14.0.0 +esid: sec-patterns +features: [regexp-v-flag] +includes: [regExpUtils.js] +---*/ + +testExtendedCharacterClass({ + regExp: /^[\q{0|2|4|9\uFE0F\u20E3}--_]+$/v, + expression: "[\q{0|2|4|9\uFE0F\u20E3}--_]", + matchStrings: [ + "0", + "2", + "4", + "9\uFE0F\u20E3" + ], + nonMatchStrings: [ + "6\uFE0F\u20E3", + "7", + "C", + "\u2603", + "\u{1D306}", + "\u{1F1E7}\u{1F1EA}" + ], +}); diff --git a/test/built-ins/RegExp/unicodeSets/string-literal-difference-property-of-strings-escape.js b/test/built-ins/RegExp/unicodeSets/string-literal-difference-property-of-strings-escape.js new file mode 100644 index 0000000000..7cf44fbf75 --- /dev/null +++ b/test/built-ins/RegExp/unicodeSets/string-literal-difference-property-of-strings-escape.js @@ -0,0 +1,35 @@ +// Copyright 2022 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Extended character classes enabled by the RegExp `v` flag support + properties of strings, string literals, and set operations +info: | + Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests + Unicode v14.0.0 +esid: sec-patterns +features: [regexp-unicode-property-escapes, regexp-v-flag] +includes: [regExpUtils.js] +---*/ + +testExtendedCharacterClass({ + regExp: /^[\q{0|2|4|9\uFE0F\u20E3}--\p{Emoji_Keycap_Sequence}]+$/v, + expression: "[\q{0|2|4|9\uFE0F\u20E3}--\p{Emoji_Keycap_Sequence}]", + matchStrings: [ + "0", + "2", + "4" + ], + nonMatchStrings: [ + "6\uFE0F\u20E3", + "7", + "9\uFE0F\u20E3", + "9\uFE0F\u20E3", + "C", + "\u2603", + "\u{1D306}", + "\u{1F1E7}\u{1F1EA}" + ], +}); diff --git a/test/built-ins/RegExp/unicodeSets/string-literal-difference-string-literal.js b/test/built-ins/RegExp/unicodeSets/string-literal-difference-string-literal.js new file mode 100644 index 0000000000..95b89b8068 --- /dev/null +++ b/test/built-ins/RegExp/unicodeSets/string-literal-difference-string-literal.js @@ -0,0 +1,34 @@ +// Copyright 2022 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Extended character classes enabled by the RegExp `v` flag support + properties of strings, string literals, and set operations +info: | + Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests + Unicode v14.0.0 +esid: sec-patterns +features: [regexp-v-flag] +includes: [regExpUtils.js] +---*/ + +testExtendedCharacterClass({ + regExp: /^[\q{0|2|4|9\uFE0F\u20E3}--\q{0|2|4|9\uFE0F\u20E3}]+$/v, + expression: "[\q{0|2|4|9\uFE0F\u20E3}--\q{0|2|4|9\uFE0F\u20E3}]", + matchStrings: [], + nonMatchStrings: [ + "0", + "2", + "4", + "6\uFE0F\u20E3", + "7", + "9\uFE0F\u20E3", + "9\uFE0F\u20E3", + "C", + "\u2603", + "\u{1D306}", + "\u{1F1E7}\u{1F1EA}" + ], +}); diff --git a/test/built-ins/RegExp/unicodeSets/string-literal-intersection-character-class-escape.js b/test/built-ins/RegExp/unicodeSets/string-literal-intersection-character-class-escape.js new file mode 100644 index 0000000000..512eab14fa --- /dev/null +++ b/test/built-ins/RegExp/unicodeSets/string-literal-intersection-character-class-escape.js @@ -0,0 +1,35 @@ +// Copyright 2022 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Extended character classes enabled by the RegExp `v` flag support + properties of strings, string literals, and set operations +info: | + Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests + Unicode v14.0.0 +esid: sec-patterns +features: [regexp-v-flag] +includes: [regExpUtils.js] +---*/ + +testExtendedCharacterClass({ + regExp: /^[\q{0|2|4|9\uFE0F\u20E3}&&\d]+$/v, + expression: "[\q{0|2|4|9\uFE0F\u20E3}&&\d]", + matchStrings: [ + "0", + "2", + "4" + ], + nonMatchStrings: [ + "6\uFE0F\u20E3", + "7", + "9\uFE0F\u20E3", + "9\uFE0F\u20E3", + "C", + "\u2603", + "\u{1D306}", + "\u{1F1E7}\u{1F1EA}" + ], +}); diff --git a/test/built-ins/RegExp/unicodeSets/string-literal-intersection-character-class.js b/test/built-ins/RegExp/unicodeSets/string-literal-intersection-character-class.js new file mode 100644 index 0000000000..c73b944c92 --- /dev/null +++ b/test/built-ins/RegExp/unicodeSets/string-literal-intersection-character-class.js @@ -0,0 +1,35 @@ +// Copyright 2022 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Extended character classes enabled by the RegExp `v` flag support + properties of strings, string literals, and set operations +info: | + Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests + Unicode v14.0.0 +esid: sec-patterns +features: [regexp-v-flag] +includes: [regExpUtils.js] +---*/ + +testExtendedCharacterClass({ + regExp: /^[\q{0|2|4|9\uFE0F\u20E3}&&[0-9]]+$/v, + expression: "[\q{0|2|4|9\uFE0F\u20E3}&&[0-9]]", + matchStrings: [ + "0", + "2", + "4" + ], + nonMatchStrings: [ + "6\uFE0F\u20E3", + "7", + "9\uFE0F\u20E3", + "9\uFE0F\u20E3", + "C", + "\u2603", + "\u{1D306}", + "\u{1F1E7}\u{1F1EA}" + ], +}); diff --git a/test/built-ins/RegExp/unicodeSets/string-literal-intersection-character-property-escape.js b/test/built-ins/RegExp/unicodeSets/string-literal-intersection-character-property-escape.js new file mode 100644 index 0000000000..02c7f007ec --- /dev/null +++ b/test/built-ins/RegExp/unicodeSets/string-literal-intersection-character-property-escape.js @@ -0,0 +1,35 @@ +// Copyright 2022 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Extended character classes enabled by the RegExp `v` flag support + properties of strings, string literals, and set operations +info: | + Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests + Unicode v14.0.0 +esid: sec-patterns +features: [regexp-unicode-property-escapes, regexp-v-flag] +includes: [regExpUtils.js] +---*/ + +testExtendedCharacterClass({ + regExp: /^[\q{0|2|4|9\uFE0F\u20E3}&&\p{ASCII_Hex_Digit}]+$/v, + expression: "[\q{0|2|4|9\uFE0F\u20E3}&&\p{ASCII_Hex_Digit}]", + matchStrings: [ + "0", + "2", + "4" + ], + nonMatchStrings: [ + "6\uFE0F\u20E3", + "7", + "9\uFE0F\u20E3", + "9\uFE0F\u20E3", + "C", + "\u2603", + "\u{1D306}", + "\u{1F1E7}\u{1F1EA}" + ], +}); diff --git a/test/built-ins/RegExp/unicodeSets/string-literal-intersection-character.js b/test/built-ins/RegExp/unicodeSets/string-literal-intersection-character.js new file mode 100644 index 0000000000..7d14141ba9 --- /dev/null +++ b/test/built-ins/RegExp/unicodeSets/string-literal-intersection-character.js @@ -0,0 +1,34 @@ +// Copyright 2022 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Extended character classes enabled by the RegExp `v` flag support + properties of strings, string literals, and set operations +info: | + Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests + Unicode v14.0.0 +esid: sec-patterns +features: [regexp-v-flag] +includes: [regExpUtils.js] +---*/ + +testExtendedCharacterClass({ + regExp: /^[\q{0|2|4|9\uFE0F\u20E3}&&_]+$/v, + expression: "[\q{0|2|4|9\uFE0F\u20E3}&&_]", + matchStrings: [], + nonMatchStrings: [ + "0", + "2", + "4", + "6\uFE0F\u20E3", + "7", + "9\uFE0F\u20E3", + "9\uFE0F\u20E3", + "C", + "\u2603", + "\u{1D306}", + "\u{1F1E7}\u{1F1EA}" + ], +}); diff --git a/test/built-ins/RegExp/unicodeSets/string-literal-intersection-property-of-strings-escape.js b/test/built-ins/RegExp/unicodeSets/string-literal-intersection-property-of-strings-escape.js new file mode 100644 index 0000000000..1b4ea0ff06 --- /dev/null +++ b/test/built-ins/RegExp/unicodeSets/string-literal-intersection-property-of-strings-escape.js @@ -0,0 +1,34 @@ +// Copyright 2022 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Extended character classes enabled by the RegExp `v` flag support + properties of strings, string literals, and set operations +info: | + Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests + Unicode v14.0.0 +esid: sec-patterns +features: [regexp-unicode-property-escapes, regexp-v-flag] +includes: [regExpUtils.js] +---*/ + +testExtendedCharacterClass({ + regExp: /^[\q{0|2|4|9\uFE0F\u20E3}&&\p{Emoji_Keycap_Sequence}]+$/v, + expression: "[\q{0|2|4|9\uFE0F\u20E3}&&\p{Emoji_Keycap_Sequence}]", + matchStrings: [ + "9\uFE0F\u20E3" + ], + nonMatchStrings: [ + "0", + "2", + "4", + "6\uFE0F\u20E3", + "7", + "C", + "\u2603", + "\u{1D306}", + "\u{1F1E7}\u{1F1EA}" + ], +}); diff --git a/test/built-ins/RegExp/unicodeSets/string-literal-intersection-string-literal.js b/test/built-ins/RegExp/unicodeSets/string-literal-intersection-string-literal.js new file mode 100644 index 0000000000..cc10fa5e8f --- /dev/null +++ b/test/built-ins/RegExp/unicodeSets/string-literal-intersection-string-literal.js @@ -0,0 +1,34 @@ +// Copyright 2022 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Extended character classes enabled by the RegExp `v` flag support + properties of strings, string literals, and set operations +info: | + Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests + Unicode v14.0.0 +esid: sec-patterns +features: [regexp-v-flag] +includes: [regExpUtils.js] +---*/ + +testExtendedCharacterClass({ + regExp: /^[\q{0|2|4|9\uFE0F\u20E3}&&\q{0|2|4|9\uFE0F\u20E3}]+$/v, + expression: "[\q{0|2|4|9\uFE0F\u20E3}&&\q{0|2|4|9\uFE0F\u20E3}]", + matchStrings: [ + "0", + "2", + "4", + "9\uFE0F\u20E3" + ], + nonMatchStrings: [ + "6\uFE0F\u20E3", + "7", + "C", + "\u2603", + "\u{1D306}", + "\u{1F1E7}\u{1F1EA}" + ], +}); diff --git a/test/built-ins/RegExp/unicodeSets/string-literal-union-character-class-escape.js b/test/built-ins/RegExp/unicodeSets/string-literal-union-character-class-escape.js new file mode 100644 index 0000000000..e9dcf9097b --- /dev/null +++ b/test/built-ins/RegExp/unicodeSets/string-literal-union-character-class-escape.js @@ -0,0 +1,40 @@ +// Copyright 2022 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Extended character classes enabled by the RegExp `v` flag support + properties of strings, string literals, and set operations +info: | + Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests + Unicode v14.0.0 +esid: sec-patterns +features: [regexp-v-flag] +includes: [regExpUtils.js] +---*/ + +testExtendedCharacterClass({ + regExp: /^[\q{0|2|4|9\uFE0F\u20E3}\d]+$/v, + expression: "[\q{0|2|4|9\uFE0F\u20E3}\d]", + matchStrings: [ + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9", + "9\uFE0F\u20E3" + ], + nonMatchStrings: [ + "6\uFE0F\u20E3", + "C", + "\u2603", + "\u{1D306}", + "\u{1F1E7}\u{1F1EA}" + ], +}); diff --git a/test/built-ins/RegExp/unicodeSets/string-literal-union-character-class.js b/test/built-ins/RegExp/unicodeSets/string-literal-union-character-class.js new file mode 100644 index 0000000000..f005189f75 --- /dev/null +++ b/test/built-ins/RegExp/unicodeSets/string-literal-union-character-class.js @@ -0,0 +1,40 @@ +// Copyright 2022 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Extended character classes enabled by the RegExp `v` flag support + properties of strings, string literals, and set operations +info: | + Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests + Unicode v14.0.0 +esid: sec-patterns +features: [regexp-v-flag] +includes: [regExpUtils.js] +---*/ + +testExtendedCharacterClass({ + regExp: /^[\q{0|2|4|9\uFE0F\u20E3}[0-9]]+$/v, + expression: "[\q{0|2|4|9\uFE0F\u20E3}[0-9]]", + matchStrings: [ + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9", + "9\uFE0F\u20E3" + ], + nonMatchStrings: [ + "6\uFE0F\u20E3", + "C", + "\u2603", + "\u{1D306}", + "\u{1F1E7}\u{1F1EA}" + ], +}); diff --git a/test/built-ins/RegExp/unicodeSets/string-literal-union-character-property-escape.js b/test/built-ins/RegExp/unicodeSets/string-literal-union-character-property-escape.js new file mode 100644 index 0000000000..09af1a06e1 --- /dev/null +++ b/test/built-ins/RegExp/unicodeSets/string-literal-union-character-property-escape.js @@ -0,0 +1,51 @@ +// Copyright 2022 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Extended character classes enabled by the RegExp `v` flag support + properties of strings, string literals, and set operations +info: | + Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests + Unicode v14.0.0 +esid: sec-patterns +features: [regexp-unicode-property-escapes, regexp-v-flag] +includes: [regExpUtils.js] +---*/ + +testExtendedCharacterClass({ + regExp: /^[\q{0|2|4|9\uFE0F\u20E3}\p{ASCII_Hex_Digit}]+$/v, + expression: "[\q{0|2|4|9\uFE0F\u20E3}\p{ASCII_Hex_Digit}]", + matchStrings: [ + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9", + "9\uFE0F\u20E3", + "A", + "B", + "C", + "D", + "E", + "F", + "a", + "b", + "c", + "d", + "e", + "f" + ], + nonMatchStrings: [ + "6\uFE0F\u20E3", + "\u2603", + "\u{1D306}", + "\u{1F1E7}\u{1F1EA}" + ], +}); diff --git a/test/built-ins/RegExp/unicodeSets/string-literal-union-character.js b/test/built-ins/RegExp/unicodeSets/string-literal-union-character.js new file mode 100644 index 0000000000..3711342901 --- /dev/null +++ b/test/built-ins/RegExp/unicodeSets/string-literal-union-character.js @@ -0,0 +1,35 @@ +// Copyright 2022 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Extended character classes enabled by the RegExp `v` flag support + properties of strings, string literals, and set operations +info: | + Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests + Unicode v14.0.0 +esid: sec-patterns +features: [regexp-v-flag] +includes: [regExpUtils.js] +---*/ + +testExtendedCharacterClass({ + regExp: /^[\q{0|2|4|9\uFE0F\u20E3}_]+$/v, + expression: "[\q{0|2|4|9\uFE0F\u20E3}_]", + matchStrings: [ + "0", + "2", + "4", + "9\uFE0F\u20E3", + "_" + ], + nonMatchStrings: [ + "6\uFE0F\u20E3", + "7", + "C", + "\u2603", + "\u{1D306}", + "\u{1F1E7}\u{1F1EA}" + ], +}); diff --git a/test/built-ins/RegExp/unicodeSets/string-literal-union-property-of-strings-escape.js b/test/built-ins/RegExp/unicodeSets/string-literal-union-property-of-strings-escape.js new file mode 100644 index 0000000000..f5ca503970 --- /dev/null +++ b/test/built-ins/RegExp/unicodeSets/string-literal-union-property-of-strings-escape.js @@ -0,0 +1,44 @@ +// Copyright 2022 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Extended character classes enabled by the RegExp `v` flag support + properties of strings, string literals, and set operations +info: | + Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests + Unicode v14.0.0 +esid: sec-patterns +features: [regexp-unicode-property-escapes, regexp-v-flag] +includes: [regExpUtils.js] +---*/ + +testExtendedCharacterClass({ + regExp: /^[\q{0|2|4|9\uFE0F\u20E3}\p{Emoji_Keycap_Sequence}]+$/v, + expression: "[\q{0|2|4|9\uFE0F\u20E3}\p{Emoji_Keycap_Sequence}]", + matchStrings: [ + "#\uFE0F\u20E3", + "*\uFE0F\u20E3", + "0", + "0\uFE0F\u20E3", + "1\uFE0F\u20E3", + "2", + "2\uFE0F\u20E3", + "3\uFE0F\u20E3", + "4", + "4\uFE0F\u20E3", + "5\uFE0F\u20E3", + "6\uFE0F\u20E3", + "7\uFE0F\u20E3", + "8\uFE0F\u20E3", + "9\uFE0F\u20E3" + ], + nonMatchStrings: [ + "7", + "C", + "\u2603", + "\u{1D306}", + "\u{1F1E7}\u{1F1EA}" + ], +}); diff --git a/test/built-ins/RegExp/unicodeSets/string-literal-union-string-literal.js b/test/built-ins/RegExp/unicodeSets/string-literal-union-string-literal.js new file mode 100644 index 0000000000..c0f7ba1ec2 --- /dev/null +++ b/test/built-ins/RegExp/unicodeSets/string-literal-union-string-literal.js @@ -0,0 +1,34 @@ +// Copyright 2022 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Extended character classes enabled by the RegExp `v` flag support + properties of strings, string literals, and set operations +info: | + Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests + Unicode v14.0.0 +esid: sec-patterns +features: [regexp-v-flag] +includes: [regExpUtils.js] +---*/ + +testExtendedCharacterClass({ + regExp: /^[\q{0|2|4|9\uFE0F\u20E3}\q{0|2|4|9\uFE0F\u20E3}]+$/v, + expression: "[\q{0|2|4|9\uFE0F\u20E3}\q{0|2|4|9\uFE0F\u20E3}]", + matchStrings: [ + "0", + "2", + "4", + "9\uFE0F\u20E3" + ], + nonMatchStrings: [ + "6\uFE0F\u20E3", + "7", + "C", + "\u2603", + "\u{1D306}", + "\u{1F1E7}\u{1F1EA}" + ], +});