1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
|
// Copyright 2022 Mathias Bynens. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
author: Mathias Bynens
description: >
Unicode property escapes for `Script_Extensions=Bengali`
info: |
Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests
Unicode v15.0.0
esid: sec-static-semantics-unicodematchproperty-p
features: [regexp-unicode-property-escapes]
includes: [regExpUtils.js]
---*/
const matchSymbols = buildString({
loneCodePoints: [
0x0009B2,
0x0009D7,
0x001CD0,
0x001CD2,
0x001CD8,
0x001CE1,
0x001CEA,
0x001CED,
0x001CF2,
0x00A8F1
],
ranges: [
[0x000951, 0x000952],
[0x000964, 0x000965],
[0x000980, 0x000983],
[0x000985, 0x00098C],
[0x00098F, 0x000990],
[0x000993, 0x0009A8],
[0x0009AA, 0x0009B0],
[0x0009B6, 0x0009B9],
[0x0009BC, 0x0009C4],
[0x0009C7, 0x0009C8],
[0x0009CB, 0x0009CE],
[0x0009DC, 0x0009DD],
[0x0009DF, 0x0009E3],
[0x0009E6, 0x0009FE],
[0x001CD5, 0x001CD6],
[0x001CF5, 0x001CF7]
]
});
testPropertyEscapes(
/^\p{Script_Extensions=Bengali}+$/u,
matchSymbols,
"\\p{Script_Extensions=Bengali}"
);
testPropertyEscapes(
/^\p{Script_Extensions=Beng}+$/u,
matchSymbols,
"\\p{Script_Extensions=Beng}"
);
testPropertyEscapes(
/^\p{scx=Bengali}+$/u,
matchSymbols,
"\\p{scx=Bengali}"
);
testPropertyEscapes(
/^\p{scx=Beng}+$/u,
matchSymbols,
"\\p{scx=Beng}"
);
const nonMatchSymbols = buildString({
loneCodePoints: [
0x000984,
0x0009A9,
0x0009B1,
0x0009DE,
0x001CD1,
0x001CD7
],
ranges: [
[0x00DC00, 0x00DFFF],
[0x000000, 0x000950],
[0x000953, 0x000963],
[0x000966, 0x00097F],
[0x00098D, 0x00098E],
[0x000991, 0x000992],
[0x0009B3, 0x0009B5],
[0x0009BA, 0x0009BB],
[0x0009C5, 0x0009C6],
[0x0009C9, 0x0009CA],
[0x0009CF, 0x0009D6],
[0x0009D8, 0x0009DB],
[0x0009E4, 0x0009E5],
[0x0009FF, 0x001CCF],
[0x001CD3, 0x001CD4],
[0x001CD9, 0x001CE0],
[0x001CE2, 0x001CE9],
[0x001CEB, 0x001CEC],
[0x001CEE, 0x001CF1],
[0x001CF3, 0x001CF4],
[0x001CF8, 0x00A8F0],
[0x00A8F2, 0x00DBFF],
[0x00E000, 0x10FFFF]
]
});
testPropertyEscapes(
/^\P{Script_Extensions=Bengali}+$/u,
nonMatchSymbols,
"\\P{Script_Extensions=Bengali}"
);
testPropertyEscapes(
/^\P{Script_Extensions=Beng}+$/u,
nonMatchSymbols,
"\\P{Script_Extensions=Beng}"
);
testPropertyEscapes(
/^\P{scx=Bengali}+$/u,
nonMatchSymbols,
"\\P{scx=Bengali}"
);
testPropertyEscapes(
/^\P{scx=Beng}+$/u,
nonMatchSymbols,
"\\P{scx=Beng}"
);
reportCompare(0, 0);
|