Debian Codegraph @

js/src/tests/test262/built-ins/RegExp/property-escapes/generated/Script_-_Sinhala.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=Sinhala`
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 0x000DBD,
19 0x000DCA,
20 0x000DD6
21 ],
22 ranges: [
23 [0x000D81, 0x000D83],
24 [0x000D85, 0x000D96],
25 [0x000D9A, 0x000DB1],
26 [0x000DB3, 0x000DBB],
27 [0x000DC0, 0x000DC6],
28 [0x000DCF, 0x000DD4],
29 [0x000DD8, 0x000DDF],
30 [0x000DE6, 0x000DEF],
31 [0x000DF2, 0x000DF4],
32 [0x0111E1, 0x0111F4]
33 ]
34 });
35 testPropertyEscapes(
36 /^\p{Script=Sinhala}+$/u,
37 matchSymbols,
38 "\\p{Script=Sinhala}"
39 );
40 testPropertyEscapes(
41 /^\p{Script=Sinh}+$/u,
42 matchSymbols,
43 "\\p{Script=Sinh}"
44 );
45 testPropertyEscapes(
46 /^\p{sc=Sinhala}+$/u,
47 matchSymbols,
48 "\\p{sc=Sinhala}"
49 );
50 testPropertyEscapes(
51 /^\p{sc=Sinh}+$/u,
52 matchSymbols,
53 "\\p{sc=Sinh}"
54 );
55
56 const nonMatchSymbols = buildString({
57 loneCodePoints: [
58 0x000D84,
59 0x000DB2,
60 0x000DBC,
61 0x000DD5,
62 0x000DD7
63 ],
64 ranges: [
65 [0x00DC00, 0x00DFFF],
66 [0x000000, 0x000D80],
67 [0x000D97, 0x000D99],
68 [0x000DBE, 0x000DBF],
69 [0x000DC7, 0x000DC9],
70 [0x000DCB, 0x000DCE],
71 [0x000DE0, 0x000DE5],
72 [0x000DF0, 0x000DF1],
73 [0x000DF5, 0x00DBFF],
74 [0x00E000, 0x0111E0],
75 [0x0111F5, 0x10FFFF]
76 ]
77 });
78 testPropertyEscapes(
79 /^\P{Script=Sinhala}+$/u,
80 nonMatchSymbols,
81 "\\P{Script=Sinhala}"
82 );
83 testPropertyEscapes(
84 /^\P{Script=Sinh}+$/u,
85 nonMatchSymbols,
86 "\\P{Script=Sinh}"
87 );
88 testPropertyEscapes(
89 /^\P{sc=Sinhala}+$/u,
90 nonMatchSymbols,
91 "\\P{sc=Sinhala}"
92 );
93 testPropertyEscapes(
94 /^\P{sc=Sinh}+$/u,
95 nonMatchSymbols,
96 "\\P{sc=Sinh}"
97 );
98
99 reportCompare(0, 0);