Debian Codegraph @

js/src/tests/test262/built-ins/RegExp/property-escapes/generated/Script_-_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=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 0x003005,
19 0x003007
20 ],
21 ranges: [
22 [0x002E80, 0x002E99],
23 [0x002E9B, 0x002EF3],
24 [0x002F00, 0x002FD5],
25 [0x003021, 0x003029],
26 [0x003038, 0x00303B],
27 [0x003400, 0x004DBF],
28 [0x004E00, 0x009FFF],
29 [0x00F900, 0x00FA6D],
30 [0x00FA70, 0x00FAD9],
31 [0x016FE2, 0x016FE3],
32 [0x016FF0, 0x016FF1],
33 [0x020000, 0x02A6DF],
34 [0x02A700, 0x02B739],
35 [0x02B740, 0x02B81D],
36 [0x02B820, 0x02CEA1],
37 [0x02CEB0, 0x02EBE0],
38 [0x02EBF0, 0x02EE5D],
39 [0x02F800, 0x02FA1D],
40 [0x030000, 0x03134A],
41 [0x031350, 0x0323AF]
42 ]
43 });
44 testPropertyEscapes(
45 /^\p{Script=Han}+$/u,
46 matchSymbols,
47 "\\p{Script=Han}"
48 );
49 testPropertyEscapes(
50 /^\p{Script=Hani}+$/u,
51 matchSymbols,
52 "\\p{Script=Hani}"
53 );
54 testPropertyEscapes(
55 /^\p{sc=Han}+$/u,
56 matchSymbols,
57 "\\p{sc=Han}"
58 );
59 testPropertyEscapes(
60 /^\p{sc=Hani}+$/u,
61 matchSymbols,
62 "\\p{sc=Hani}"
63 );
64
65 const nonMatchSymbols = buildString({
66 loneCodePoints: [
67 0x002E9A,
68 0x003006
69 ],
70 ranges: [
71 [0x00DC00, 0x00DFFF],
72 [0x000000, 0x002E7F],
73 [0x002EF4, 0x002EFF],
74 [0x002FD6, 0x003004],
75 [0x003008, 0x003020],
76 [0x00302A, 0x003037],
77 [0x00303C, 0x0033FF],
78 [0x004DC0, 0x004DFF],
79 [0x00A000, 0x00DBFF],
80 [0x00E000, 0x00F8FF],
81 [0x00FA6E, 0x00FA6F],
82 [0x00FADA, 0x016FE1],
83 [0x016FE4, 0x016FEF],
84 [0x016FF2, 0x01FFFF],
85 [0x02A6E0, 0x02A6FF],
86 [0x02B73A, 0x02B73F],
87 [0x02B81E, 0x02B81F],
88 [0x02CEA2, 0x02CEAF],
89 [0x02EBE1, 0x02EBEF],
90 [0x02EE5E, 0x02F7FF],
91 [0x02FA1E, 0x02FFFF],
92 [0x03134B, 0x03134F],
93 [0x0323B0, 0x10FFFF]
94 ]
95 });
96 testPropertyEscapes(
97 /^\P{Script=Han}+$/u,
98 nonMatchSymbols,
99 "\\P{Script=Han}"
100 );
101 testPropertyEscapes(
102 /^\P{Script=Hani}+$/u,
103 nonMatchSymbols,
104 "\\P{Script=Hani}"
105 );
106 testPropertyEscapes(
107 /^\P{sc=Han}+$/u,
108 nonMatchSymbols,
109 "\\P{sc=Han}"
110 );
111 testPropertyEscapes(
112 /^\P{sc=Hani}+$/u,
113 nonMatchSymbols,
114 "\\P{sc=Hani}"
115 );
116
117 reportCompare(0, 0);