Debian Codegraph @

js/src/tests/test262/built-ins/RegExp/property-escapes/generated/Script_-_Grantha.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=Grantha`
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 0x011350,
19 0x011357
20 ],
21 ranges: [
22 [0x011300, 0x011303],
23 [0x011305, 0x01130C],
24 [0x01130F, 0x011310],
25 [0x011313, 0x011328],
26 [0x01132A, 0x011330],
27 [0x011332, 0x011333],
28 [0x011335, 0x011339],
29 [0x01133C, 0x011344],
30 [0x011347, 0x011348],
31 [0x01134B, 0x01134D],
32 [0x01135D, 0x011363],
33 [0x011366, 0x01136C],
34 [0x011370, 0x011374]
35 ]
36 });
37 testPropertyEscapes(
38 /^\p{Script=Grantha}+$/u,
39 matchSymbols,
40 "\\p{Script=Grantha}"
41 );
42 testPropertyEscapes(
43 /^\p{Script=Gran}+$/u,
44 matchSymbols,
45 "\\p{Script=Gran}"
46 );
47 testPropertyEscapes(
48 /^\p{sc=Grantha}+$/u,
49 matchSymbols,
50 "\\p{sc=Grantha}"
51 );
52 testPropertyEscapes(
53 /^\p{sc=Gran}+$/u,
54 matchSymbols,
55 "\\p{sc=Gran}"
56 );
57
58 const nonMatchSymbols = buildString({
59 loneCodePoints: [
60 0x011304,
61 0x011329,
62 0x011331,
63 0x011334
64 ],
65 ranges: [
66 [0x00DC00, 0x00DFFF],
67 [0x000000, 0x00DBFF],
68 [0x00E000, 0x0112FF],
69 [0x01130D, 0x01130E],
70 [0x011311, 0x011312],
71 [0x01133A, 0x01133B],
72 [0x011345, 0x011346],
73 [0x011349, 0x01134A],
74 [0x01134E, 0x01134F],
75 [0x011351, 0x011356],
76 [0x011358, 0x01135C],
77 [0x011364, 0x011365],
78 [0x01136D, 0x01136F],
79 [0x011375, 0x10FFFF]
80 ]
81 });
82 testPropertyEscapes(
83 /^\P{Script=Grantha}+$/u,
84 nonMatchSymbols,
85 "\\P{Script=Grantha}"
86 );
87 testPropertyEscapes(
88 /^\P{Script=Gran}+$/u,
89 nonMatchSymbols,
90 "\\P{Script=Gran}"
91 );
92 testPropertyEscapes(
93 /^\P{sc=Grantha}+$/u,
94 nonMatchSymbols,
95 "\\P{sc=Grantha}"
96 );
97 testPropertyEscapes(
98 /^\P{sc=Gran}+$/u,
99 nonMatchSymbols,
100 "\\P{sc=Gran}"
101 );
102
103 reportCompare(0, 0);