Debian Codegraph @

js/src/tests/test262/built-ins/RegExp/property-escapes/generated/Script_-_Katakana.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=Katakana`
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 0x01B000,
19 0x01B155
20 ],
21 ranges: [
22 [0x0030A1, 0x0030FA],
23 [0x0030FD, 0x0030FF],
24 [0x0031F0, 0x0031FF],
25 [0x0032D0, 0x0032FE],
26 [0x003300, 0x003357],
27 [0x00FF66, 0x00FF6F],
28 [0x00FF71, 0x00FF9D],
29 [0x01AFF0, 0x01AFF3],
30 [0x01AFF5, 0x01AFFB],
31 [0x01AFFD, 0x01AFFE],
32 [0x01B120, 0x01B122],
33 [0x01B164, 0x01B167]
34 ]
35 });
36 testPropertyEscapes(
37 /^\p{Script=Katakana}+$/u,
38 matchSymbols,
39 "\\p{Script=Katakana}"
40 );
41 testPropertyEscapes(
42 /^\p{Script=Kana}+$/u,
43 matchSymbols,
44 "\\p{Script=Kana}"
45 );
46 testPropertyEscapes(
47 /^\p{sc=Katakana}+$/u,
48 matchSymbols,
49 "\\p{sc=Katakana}"
50 );
51 testPropertyEscapes(
52 /^\p{sc=Kana}+$/u,
53 matchSymbols,
54 "\\p{sc=Kana}"
55 );
56
57 const nonMatchSymbols = buildString({
58 loneCodePoints: [
59 0x0032FF,
60 0x00FF70,
61 0x01AFF4,
62 0x01AFFC,
63 0x01AFFF
64 ],
65 ranges: [
66 [0x00DC00, 0x00DFFF],
67 [0x000000, 0x0030A0],
68 [0x0030FB, 0x0030FC],
69 [0x003100, 0x0031EF],
70 [0x003200, 0x0032CF],
71 [0x003358, 0x00DBFF],
72 [0x00E000, 0x00FF65],
73 [0x00FF9E, 0x01AFEF],
74 [0x01B001, 0x01B11F],
75 [0x01B123, 0x01B154],
76 [0x01B156, 0x01B163],
77 [0x01B168, 0x10FFFF]
78 ]
79 });
80 testPropertyEscapes(
81 /^\P{Script=Katakana}+$/u,
82 nonMatchSymbols,
83 "\\P{Script=Katakana}"
84 );
85 testPropertyEscapes(
86 /^\P{Script=Kana}+$/u,
87 nonMatchSymbols,
88 "\\P{Script=Kana}"
89 );
90 testPropertyEscapes(
91 /^\P{sc=Katakana}+$/u,
92 nonMatchSymbols,
93 "\\P{sc=Katakana}"
94 );
95 testPropertyEscapes(
96 /^\P{sc=Kana}+$/u,
97 nonMatchSymbols,
98 "\\P{sc=Kana}"
99 );
100
101 reportCompare(0, 0);