Debian Codegraph @

js/src/tests/test262/built-ins/RegExp/unicodeSets/generated/character-property-escape-difference-string-literal.js

raw
1 // Copyright 2024 Mathias Bynens. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
3
4 /*---
5 author: Mathias Bynens
6 description: >
7 Extended character classes enabled by the RegExp `v` flag support
8 properties of strings, string literals, and set operations
9 info: |
10 Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests
11 Unicode v16.0.0
12 esid: sec-patterns
13 features: [regexp-unicode-property-escapes, regexp-v-flag]
14 includes: [regExpUtils.js]
15 ---*/
16
17 testExtendedCharacterClass({
18 regExp: /^[\p{ASCII_Hex_Digit}--\q{0|2|4|9\uFE0F\u20E3}]+$/v,
19 expression: "[\p{ASCII_Hex_Digit}--\q{0|2|4|9\uFE0F\u20E3}]",
20 matchStrings: [
21 "1",
22 "3",
23 "5",
24 "6",
25 "7",
26 "8",
27 "9",
28 "A",
29 "B",
30 "C",
31 "D",
32 "E",
33 "F",
34 "a",
35 "b",
36 "c",
37 "d",
38 "e",
39 "f"
40 ],
41 nonMatchStrings: [
42 "0",
43 "2",
44 "4",
45 "6\uFE0F\u20E3",
46 "9\uFE0F\u20E3",
47 "\u2603",
48 "\u{1D306}",
49 "\u{1F1E7}\u{1F1EA}"
50 ],
51 });
52
53 reportCompare(0, 0);