Debian Codegraph @

js/src/tests/test262/built-ins/RegExp/property-escapes/generated/Script_-_Latin.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=Latin`
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 0x0000AA,
19 0x0000BA,
20 0x002071,
21 0x00207F,
22 0x002132,
23 0x00214E,
24 0x00A7D3
25 ],
26 ranges: [
27 [0x000041, 0x00005A],
28 [0x000061, 0x00007A],
29 [0x0000C0, 0x0000D6],
30 [0x0000D8, 0x0000F6],
31 [0x0000F8, 0x0002B8],
32 [0x0002E0, 0x0002E4],
33 [0x001D00, 0x001D25],
34 [0x001D2C, 0x001D5C],
35 [0x001D62, 0x001D65],
36 [0x001D6B, 0x001D77],
37 [0x001D79, 0x001DBE],
38 [0x001E00, 0x001EFF],
39 [0x002090, 0x00209C],
40 [0x00212A, 0x00212B],
41 [0x002160, 0x002188],
42 [0x002C60, 0x002C7F],
43 [0x00A722, 0x00A787],
44 [0x00A78B, 0x00A7CD],
45 [0x00A7D0, 0x00A7D1],
46 [0x00A7D5, 0x00A7DC],
47 [0x00A7F2, 0x00A7FF],
48 [0x00AB30, 0x00AB5A],
49 [0x00AB5C, 0x00AB64],
50 [0x00AB66, 0x00AB69],
51 [0x00FB00, 0x00FB06],
52 [0x00FF21, 0x00FF3A],
53 [0x00FF41, 0x00FF5A],
54 [0x010780, 0x010785],
55 [0x010787, 0x0107B0],
56 [0x0107B2, 0x0107BA],
57 [0x01DF00, 0x01DF1E],
58 [0x01DF25, 0x01DF2A]
59 ]
60 });
61 testPropertyEscapes(
62 /^\p{Script=Latin}+$/u,
63 matchSymbols,
64 "\\p{Script=Latin}"
65 );
66 testPropertyEscapes(
67 /^\p{Script=Latn}+$/u,
68 matchSymbols,
69 "\\p{Script=Latn}"
70 );
71 testPropertyEscapes(
72 /^\p{sc=Latin}+$/u,
73 matchSymbols,
74 "\\p{sc=Latin}"
75 );
76 testPropertyEscapes(
77 /^\p{sc=Latn}+$/u,
78 matchSymbols,
79 "\\p{sc=Latn}"
80 );
81
82 const nonMatchSymbols = buildString({
83 loneCodePoints: [
84 0x0000D7,
85 0x0000F7,
86 0x001D78,
87 0x00A7D2,
88 0x00A7D4,
89 0x00AB5B,
90 0x00AB65,
91 0x010786,
92 0x0107B1
93 ],
94 ranges: [
95 [0x00DC00, 0x00DFFF],
96 [0x000000, 0x000040],
97 [0x00005B, 0x000060],
98 [0x00007B, 0x0000A9],
99 [0x0000AB, 0x0000B9],
100 [0x0000BB, 0x0000BF],
101 [0x0002B9, 0x0002DF],
102 [0x0002E5, 0x001CFF],
103 [0x001D26, 0x001D2B],
104 [0x001D5D, 0x001D61],
105 [0x001D66, 0x001D6A],
106 [0x001DBF, 0x001DFF],
107 [0x001F00, 0x002070],
108 [0x002072, 0x00207E],
109 [0x002080, 0x00208F],
110 [0x00209D, 0x002129],
111 [0x00212C, 0x002131],
112 [0x002133, 0x00214D],
113 [0x00214F, 0x00215F],
114 [0x002189, 0x002C5F],
115 [0x002C80, 0x00A721],
116 [0x00A788, 0x00A78A],
117 [0x00A7CE, 0x00A7CF],
118 [0x00A7DD, 0x00A7F1],
119 [0x00A800, 0x00AB2F],
120 [0x00AB6A, 0x00DBFF],
121 [0x00E000, 0x00FAFF],
122 [0x00FB07, 0x00FF20],
123 [0x00FF3B, 0x00FF40],
124 [0x00FF5B, 0x01077F],
125 [0x0107BB, 0x01DEFF],
126 [0x01DF1F, 0x01DF24],
127 [0x01DF2B, 0x10FFFF]
128 ]
129 });
130 testPropertyEscapes(
131 /^\P{Script=Latin}+$/u,
132 nonMatchSymbols,
133 "\\P{Script=Latin}"
134 );
135 testPropertyEscapes(
136 /^\P{Script=Latn}+$/u,
137 nonMatchSymbols,
138 "\\P{Script=Latn}"
139 );
140 testPropertyEscapes(
141 /^\P{sc=Latin}+$/u,
142 nonMatchSymbols,
143 "\\P{sc=Latin}"
144 );
145 testPropertyEscapes(
146 /^\P{sc=Latn}+$/u,
147 nonMatchSymbols,
148 "\\P{sc=Latn}"
149 );
150
151 reportCompare(0, 0);