Debian Codegraph @

js/src/tests/test262/built-ins/RegExp/property-escapes/generated/Script_-_Hiragana.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=Hiragana`
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 0x01B132,
19 0x01F200
20 ],
21 ranges: [
22 [0x003041, 0x003096],
23 [0x00309D, 0x00309F],
24 [0x01B001, 0x01B11F],
25 [0x01B150, 0x01B152]
26 ]
27 });
28 testPropertyEscapes(
29 /^\p{Script=Hiragana}+$/u,
30 matchSymbols,
31 "\\p{Script=Hiragana}"
32 );
33 testPropertyEscapes(
34 /^\p{Script=Hira}+$/u,
35 matchSymbols,
36 "\\p{Script=Hira}"
37 );
38 testPropertyEscapes(
39 /^\p{sc=Hiragana}+$/u,
40 matchSymbols,
41 "\\p{sc=Hiragana}"
42 );
43 testPropertyEscapes(
44 /^\p{sc=Hira}+$/u,
45 matchSymbols,
46 "\\p{sc=Hira}"
47 );
48
49 const nonMatchSymbols = buildString({
50 loneCodePoints: [],
51 ranges: [
52 [0x00DC00, 0x00DFFF],
53 [0x000000, 0x003040],
54 [0x003097, 0x00309C],
55 [0x0030A0, 0x00DBFF],
56 [0x00E000, 0x01B000],
57 [0x01B120, 0x01B131],
58 [0x01B133, 0x01B14F],
59 [0x01B153, 0x01F1FF],
60 [0x01F201, 0x10FFFF]
61 ]
62 });
63 testPropertyEscapes(
64 /^\P{Script=Hiragana}+$/u,
65 nonMatchSymbols,
66 "\\P{Script=Hiragana}"
67 );
68 testPropertyEscapes(
69 /^\P{Script=Hira}+$/u,
70 nonMatchSymbols,
71 "\\P{Script=Hira}"
72 );
73 testPropertyEscapes(
74 /^\P{sc=Hiragana}+$/u,
75 nonMatchSymbols,
76 "\\P{sc=Hiragana}"
77 );
78 testPropertyEscapes(
79 /^\P{sc=Hira}+$/u,
80 nonMatchSymbols,
81 "\\P{sc=Hira}"
82 );
83
84 reportCompare(0, 0);