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