Debian Codegraph @

js/src/tests/test262/built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Han.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 Unicode property escapes for `Script_Extensions=Han`
8 info: |
9 Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests
10 Unicode v16.0.0
11 esid: sec-static-semantics-unicodematchproperty-p
12 features: [regexp-unicode-property-escapes]
13 includes: [regExpUtils.js]
14 ---*/
15
16 const matchSymbols = buildString({
17 loneCodePoints: [
18 0x0000B7,
19 0x003030,
20 0x0030FB,
21 0x0031EF,
22 0x0032FF
23 ],
24 ranges: [
25 [0x002E80, 0x002E99],
26 [0x002E9B, 0x002EF3],
27 [0x002F00, 0x002FD5],
28 [0x002FF0, 0x002FFF],
29 [0x003001, 0x003003],
30 [0x003005, 0x003011],
31 [0x003013, 0x00301F],
32 [0x003021, 0x00302D],
33 [0x003037, 0x00303F],
34 [0x003190, 0x00319F],
35 [0x0031C0, 0x0031E5],
36 [0x003220, 0x003247],
37 [0x003280, 0x0032B0],
38 [0x0032C0, 0x0032CB],
39 [0x003358, 0x003370],
40 [0x00337B, 0x00337F],
41 [0x0033E0, 0x0033FE],
42 [0x003400, 0x004DBF],
43 [0x004E00, 0x009FFF],
44 [0x00A700, 0x00A707],
45 [0x00F900, 0x00FA6D],
46 [0x00FA70, 0x00FAD9],
47 [0x00FE45, 0x00FE46],
48 [0x00FF61, 0x00FF65],
49 [0x016FE2, 0x016FE3],
50 [0x016FF0, 0x016FF1],
51 [0x01D360, 0x01D371],
52 [0x01F250, 0x01F251],
53 [0x020000, 0x02A6DF],
54 [0x02A700, 0x02B739],
55 [0x02B740, 0x02B81D],
56 [0x02B820, 0x02CEA1],
57 [0x02CEB0, 0x02EBE0],
58 [0x02EBF0, 0x02EE5D],
59 [0x02F800, 0x02FA1D],
60 [0x030000, 0x03134A],
61 [0x031350, 0x0323AF]
62 ]
63 });
64 testPropertyEscapes(
65 /^\p{Script_Extensions=Han}+$/u,
66 matchSymbols,
67 "\\p{Script_Extensions=Han}"
68 );
69 testPropertyEscapes(
70 /^\p{Script_Extensions=Hani}+$/u,
71 matchSymbols,
72 "\\p{Script_Extensions=Hani}"
73 );
74 testPropertyEscapes(
75 /^\p{scx=Han}+$/u,
76 matchSymbols,
77 "\\p{scx=Han}"
78 );
79 testPropertyEscapes(
80 /^\p{scx=Hani}+$/u,
81 matchSymbols,
82 "\\p{scx=Hani}"
83 );
84
85 const nonMatchSymbols = buildString({
86 loneCodePoints: [
87 0x002E9A,
88 0x003000,
89 0x003004,
90 0x003012,
91 0x003020,
92 0x0033FF
93 ],
94 ranges: [
95 [0x00DC00, 0x00DFFF],
96 [0x000000, 0x0000B6],
97 [0x0000B8, 0x002E7F],
98 [0x002EF4, 0x002EFF],
99 [0x002FD6, 0x002FEF],
100 [0x00302E, 0x00302F],
101 [0x003031, 0x003036],
102 [0x003040, 0x0030FA],
103 [0x0030FC, 0x00318F],
104 [0x0031A0, 0x0031BF],
105 [0x0031E6, 0x0031EE],
106 [0x0031F0, 0x00321F],
107 [0x003248, 0x00327F],
108 [0x0032B1, 0x0032BF],
109 [0x0032CC, 0x0032FE],
110 [0x003300, 0x003357],
111 [0x003371, 0x00337A],
112 [0x003380, 0x0033DF],
113 [0x004DC0, 0x004DFF],
114 [0x00A000, 0x00A6FF],
115 [0x00A708, 0x00DBFF],
116 [0x00E000, 0x00F8FF],
117 [0x00FA6E, 0x00FA6F],
118 [0x00FADA, 0x00FE44],
119 [0x00FE47, 0x00FF60],
120 [0x00FF66, 0x016FE1],
121 [0x016FE4, 0x016FEF],
122 [0x016FF2, 0x01D35F],
123 [0x01D372, 0x01F24F],
124 [0x01F252, 0x01FFFF],
125 [0x02A6E0, 0x02A6FF],
126 [0x02B73A, 0x02B73F],
127 [0x02B81E, 0x02B81F],
128 [0x02CEA2, 0x02CEAF],
129 [0x02EBE1, 0x02EBEF],
130 [0x02EE5E, 0x02F7FF],
131 [0x02FA1E, 0x02FFFF],
132 [0x03134B, 0x03134F],
133 [0x0323B0, 0x10FFFF]
134 ]
135 });
136 testPropertyEscapes(
137 /^\P{Script_Extensions=Han}+$/u,
138 nonMatchSymbols,
139 "\\P{Script_Extensions=Han}"
140 );
141 testPropertyEscapes(
142 /^\P{Script_Extensions=Hani}+$/u,
143 nonMatchSymbols,
144 "\\P{Script_Extensions=Hani}"
145 );
146 testPropertyEscapes(
147 /^\P{scx=Han}+$/u,
148 nonMatchSymbols,
149 "\\P{scx=Han}"
150 );
151 testPropertyEscapes(
152 /^\P{scx=Hani}+$/u,
153 nonMatchSymbols,
154 "\\P{scx=Hani}"
155 );
156
157 reportCompare(0, 0);