| 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=Yi` |
| 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 |
0x0030FB |
| 19 |
], |
| 20 |
ranges: [ |
| 21 |
[0x003001, 0x003002], |
| 22 |
[0x003008, 0x003011], |
| 23 |
[0x003014, 0x00301B], |
| 24 |
[0x00A000, 0x00A48C], |
| 25 |
[0x00A490, 0x00A4C6], |
| 26 |
[0x00FF61, 0x00FF65] |
| 27 |
] |
| 28 |
}); |
| 29 |
testPropertyEscapes( |
| 30 |
/^\p{Script_Extensions=Yi}+$/u, |
| 31 |
matchSymbols, |
| 32 |
"\\p{Script_Extensions=Yi}" |
| 33 |
); |
| 34 |
testPropertyEscapes( |
| 35 |
/^\p{Script_Extensions=Yiii}+$/u, |
| 36 |
matchSymbols, |
| 37 |
"\\p{Script_Extensions=Yiii}" |
| 38 |
); |
| 39 |
testPropertyEscapes( |
| 40 |
/^\p{scx=Yi}+$/u, |
| 41 |
matchSymbols, |
| 42 |
"\\p{scx=Yi}" |
| 43 |
); |
| 44 |
testPropertyEscapes( |
| 45 |
/^\p{scx=Yiii}+$/u, |
| 46 |
matchSymbols, |
| 47 |
"\\p{scx=Yiii}" |
| 48 |
); |
| 49 |
|
| 50 |
const nonMatchSymbols = buildString({ |
| 51 |
loneCodePoints: [], |
| 52 |
ranges: [ |
| 53 |
[0x00DC00, 0x00DFFF], |
| 54 |
[0x000000, 0x003000], |
| 55 |
[0x003003, 0x003007], |
| 56 |
[0x003012, 0x003013], |
| 57 |
[0x00301C, 0x0030FA], |
| 58 |
[0x0030FC, 0x009FFF], |
| 59 |
[0x00A48D, 0x00A48F], |
| 60 |
[0x00A4C7, 0x00DBFF], |
| 61 |
[0x00E000, 0x00FF60], |
| 62 |
[0x00FF66, 0x10FFFF] |
| 63 |
] |
| 64 |
}); |
| 65 |
testPropertyEscapes( |
| 66 |
/^\P{Script_Extensions=Yi}+$/u, |
| 67 |
nonMatchSymbols, |
| 68 |
"\\P{Script_Extensions=Yi}" |
| 69 |
); |
| 70 |
testPropertyEscapes( |
| 71 |
/^\P{Script_Extensions=Yiii}+$/u, |
| 72 |
nonMatchSymbols, |
| 73 |
"\\P{Script_Extensions=Yiii}" |
| 74 |
); |
| 75 |
testPropertyEscapes( |
| 76 |
/^\P{scx=Yi}+$/u, |
| 77 |
nonMatchSymbols, |
| 78 |
"\\P{scx=Yi}" |
| 79 |
); |
| 80 |
testPropertyEscapes( |
| 81 |
/^\P{scx=Yiii}+$/u, |
| 82 |
nonMatchSymbols, |
| 83 |
"\\P{scx=Yiii}" |
| 84 |
); |
| 85 |
|
| 86 |
reportCompare(0, 0); |