| 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=Duployan` |
| 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 |
0x0000B7, |
| 19 |
0x00030A, |
| 20 |
0x002E3C |
| 21 |
], |
| 22 |
ranges: [ |
| 23 |
[0x000307, 0x000308], |
| 24 |
[0x000323, 0x000324], |
| 25 |
[0x01BC00, 0x01BC6A], |
| 26 |
[0x01BC70, 0x01BC7C], |
| 27 |
[0x01BC80, 0x01BC88], |
| 28 |
[0x01BC90, 0x01BC99], |
| 29 |
[0x01BC9C, 0x01BCA3] |
| 30 |
] |
| 31 |
}); |
| 32 |
testPropertyEscapes( |
| 33 |
/^\p{Script_Extensions=Duployan}+$/u, |
| 34 |
matchSymbols, |
| 35 |
"\\p{Script_Extensions=Duployan}" |
| 36 |
); |
| 37 |
testPropertyEscapes( |
| 38 |
/^\p{Script_Extensions=Dupl}+$/u, |
| 39 |
matchSymbols, |
| 40 |
"\\p{Script_Extensions=Dupl}" |
| 41 |
); |
| 42 |
testPropertyEscapes( |
| 43 |
/^\p{scx=Duployan}+$/u, |
| 44 |
matchSymbols, |
| 45 |
"\\p{scx=Duployan}" |
| 46 |
); |
| 47 |
testPropertyEscapes( |
| 48 |
/^\p{scx=Dupl}+$/u, |
| 49 |
matchSymbols, |
| 50 |
"\\p{scx=Dupl}" |
| 51 |
); |
| 52 |
|
| 53 |
const nonMatchSymbols = buildString({ |
| 54 |
loneCodePoints: [ |
| 55 |
0x000309 |
| 56 |
], |
| 57 |
ranges: [ |
| 58 |
[0x00DC00, 0x00DFFF], |
| 59 |
[0x000000, 0x0000B6], |
| 60 |
[0x0000B8, 0x000306], |
| 61 |
[0x00030B, 0x000322], |
| 62 |
[0x000325, 0x002E3B], |
| 63 |
[0x002E3D, 0x00DBFF], |
| 64 |
[0x00E000, 0x01BBFF], |
| 65 |
[0x01BC6B, 0x01BC6F], |
| 66 |
[0x01BC7D, 0x01BC7F], |
| 67 |
[0x01BC89, 0x01BC8F], |
| 68 |
[0x01BC9A, 0x01BC9B], |
| 69 |
[0x01BCA4, 0x10FFFF] |
| 70 |
] |
| 71 |
}); |
| 72 |
testPropertyEscapes( |
| 73 |
/^\P{Script_Extensions=Duployan}+$/u, |
| 74 |
nonMatchSymbols, |
| 75 |
"\\P{Script_Extensions=Duployan}" |
| 76 |
); |
| 77 |
testPropertyEscapes( |
| 78 |
/^\P{Script_Extensions=Dupl}+$/u, |
| 79 |
nonMatchSymbols, |
| 80 |
"\\P{Script_Extensions=Dupl}" |
| 81 |
); |
| 82 |
testPropertyEscapes( |
| 83 |
/^\P{scx=Duployan}+$/u, |
| 84 |
nonMatchSymbols, |
| 85 |
"\\P{scx=Duployan}" |
| 86 |
); |
| 87 |
testPropertyEscapes( |
| 88 |
/^\P{scx=Dupl}+$/u, |
| 89 |
nonMatchSymbols, |
| 90 |
"\\P{scx=Dupl}" |
| 91 |
); |
| 92 |
|
| 93 |
reportCompare(0, 0); |