| 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=Khudawadi` |
| 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 |
ranges: [ |
| 19 |
[0x000964, 0x000965], |
| 20 |
[0x00A830, 0x00A839], |
| 21 |
[0x0112B0, 0x0112EA], |
| 22 |
[0x0112F0, 0x0112F9] |
| 23 |
] |
| 24 |
}); |
| 25 |
testPropertyEscapes( |
| 26 |
/^\p{Script_Extensions=Khudawadi}+$/u, |
| 27 |
matchSymbols, |
| 28 |
"\\p{Script_Extensions=Khudawadi}" |
| 29 |
); |
| 30 |
testPropertyEscapes( |
| 31 |
/^\p{Script_Extensions=Sind}+$/u, |
| 32 |
matchSymbols, |
| 33 |
"\\p{Script_Extensions=Sind}" |
| 34 |
); |
| 35 |
testPropertyEscapes( |
| 36 |
/^\p{scx=Khudawadi}+$/u, |
| 37 |
matchSymbols, |
| 38 |
"\\p{scx=Khudawadi}" |
| 39 |
); |
| 40 |
testPropertyEscapes( |
| 41 |
/^\p{scx=Sind}+$/u, |
| 42 |
matchSymbols, |
| 43 |
"\\p{scx=Sind}" |
| 44 |
); |
| 45 |
|
| 46 |
const nonMatchSymbols = buildString({ |
| 47 |
loneCodePoints: [], |
| 48 |
ranges: [ |
| 49 |
[0x00DC00, 0x00DFFF], |
| 50 |
[0x000000, 0x000963], |
| 51 |
[0x000966, 0x00A82F], |
| 52 |
[0x00A83A, 0x00DBFF], |
| 53 |
[0x00E000, 0x0112AF], |
| 54 |
[0x0112EB, 0x0112EF], |
| 55 |
[0x0112FA, 0x10FFFF] |
| 56 |
] |
| 57 |
}); |
| 58 |
testPropertyEscapes( |
| 59 |
/^\P{Script_Extensions=Khudawadi}+$/u, |
| 60 |
nonMatchSymbols, |
| 61 |
"\\P{Script_Extensions=Khudawadi}" |
| 62 |
); |
| 63 |
testPropertyEscapes( |
| 64 |
/^\P{Script_Extensions=Sind}+$/u, |
| 65 |
nonMatchSymbols, |
| 66 |
"\\P{Script_Extensions=Sind}" |
| 67 |
); |
| 68 |
testPropertyEscapes( |
| 69 |
/^\P{scx=Khudawadi}+$/u, |
| 70 |
nonMatchSymbols, |
| 71 |
"\\P{scx=Khudawadi}" |
| 72 |
); |
| 73 |
testPropertyEscapes( |
| 74 |
/^\P{scx=Sind}+$/u, |
| 75 |
nonMatchSymbols, |
| 76 |
"\\P{scx=Sind}" |
| 77 |
); |
| 78 |
|
| 79 |
reportCompare(0, 0); |