| 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=Malayalam` |
| 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 |
0x001CDA, |
| 19 |
0x001CF2 |
| 20 |
], |
| 21 |
ranges: [ |
| 22 |
[0x000951, 0x000952], |
| 23 |
[0x000964, 0x000965], |
| 24 |
[0x000D00, 0x000D0C], |
| 25 |
[0x000D0E, 0x000D10], |
| 26 |
[0x000D12, 0x000D44], |
| 27 |
[0x000D46, 0x000D48], |
| 28 |
[0x000D4A, 0x000D4F], |
| 29 |
[0x000D54, 0x000D63], |
| 30 |
[0x000D66, 0x000D7F], |
| 31 |
[0x00A830, 0x00A832] |
| 32 |
] |
| 33 |
}); |
| 34 |
testPropertyEscapes( |
| 35 |
/^\p{Script_Extensions=Malayalam}+$/u, |
| 36 |
matchSymbols, |
| 37 |
"\\p{Script_Extensions=Malayalam}" |
| 38 |
); |
| 39 |
testPropertyEscapes( |
| 40 |
/^\p{Script_Extensions=Mlym}+$/u, |
| 41 |
matchSymbols, |
| 42 |
"\\p{Script_Extensions=Mlym}" |
| 43 |
); |
| 44 |
testPropertyEscapes( |
| 45 |
/^\p{scx=Malayalam}+$/u, |
| 46 |
matchSymbols, |
| 47 |
"\\p{scx=Malayalam}" |
| 48 |
); |
| 49 |
testPropertyEscapes( |
| 50 |
/^\p{scx=Mlym}+$/u, |
| 51 |
matchSymbols, |
| 52 |
"\\p{scx=Mlym}" |
| 53 |
); |
| 54 |
|
| 55 |
const nonMatchSymbols = buildString({ |
| 56 |
loneCodePoints: [ |
| 57 |
0x000D0D, |
| 58 |
0x000D11, |
| 59 |
0x000D45, |
| 60 |
0x000D49 |
| 61 |
], |
| 62 |
ranges: [ |
| 63 |
[0x00DC00, 0x00DFFF], |
| 64 |
[0x000000, 0x000950], |
| 65 |
[0x000953, 0x000963], |
| 66 |
[0x000966, 0x000CFF], |
| 67 |
[0x000D50, 0x000D53], |
| 68 |
[0x000D64, 0x000D65], |
| 69 |
[0x000D80, 0x001CD9], |
| 70 |
[0x001CDB, 0x001CF1], |
| 71 |
[0x001CF3, 0x00A82F], |
| 72 |
[0x00A833, 0x00DBFF], |
| 73 |
[0x00E000, 0x10FFFF] |
| 74 |
] |
| 75 |
}); |
| 76 |
testPropertyEscapes( |
| 77 |
/^\P{Script_Extensions=Malayalam}+$/u, |
| 78 |
nonMatchSymbols, |
| 79 |
"\\P{Script_Extensions=Malayalam}" |
| 80 |
); |
| 81 |
testPropertyEscapes( |
| 82 |
/^\P{Script_Extensions=Mlym}+$/u, |
| 83 |
nonMatchSymbols, |
| 84 |
"\\P{Script_Extensions=Mlym}" |
| 85 |
); |
| 86 |
testPropertyEscapes( |
| 87 |
/^\P{scx=Malayalam}+$/u, |
| 88 |
nonMatchSymbols, |
| 89 |
"\\P{scx=Malayalam}" |
| 90 |
); |
| 91 |
testPropertyEscapes( |
| 92 |
/^\P{scx=Mlym}+$/u, |
| 93 |
nonMatchSymbols, |
| 94 |
"\\P{scx=Mlym}" |
| 95 |
); |
| 96 |
|
| 97 |
reportCompare(0, 0); |