| 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=Kannada` |
| 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 |
0x001CD0, |
| 19 |
0x001CDA, |
| 20 |
0x001CF2, |
| 21 |
0x001CF4 |
| 22 |
], |
| 23 |
ranges: [ |
| 24 |
[0x000951, 0x000952], |
| 25 |
[0x000964, 0x000965], |
| 26 |
[0x000C80, 0x000C8C], |
| 27 |
[0x000C8E, 0x000C90], |
| 28 |
[0x000C92, 0x000CA8], |
| 29 |
[0x000CAA, 0x000CB3], |
| 30 |
[0x000CB5, 0x000CB9], |
| 31 |
[0x000CBC, 0x000CC4], |
| 32 |
[0x000CC6, 0x000CC8], |
| 33 |
[0x000CCA, 0x000CCD], |
| 34 |
[0x000CD5, 0x000CD6], |
| 35 |
[0x000CDD, 0x000CDE], |
| 36 |
[0x000CE0, 0x000CE3], |
| 37 |
[0x000CE6, 0x000CEF], |
| 38 |
[0x000CF1, 0x000CF3], |
| 39 |
[0x001CD2, 0x001CD3], |
| 40 |
[0x00A830, 0x00A835] |
| 41 |
] |
| 42 |
}); |
| 43 |
testPropertyEscapes( |
| 44 |
/^\p{Script_Extensions=Kannada}+$/u, |
| 45 |
matchSymbols, |
| 46 |
"\\p{Script_Extensions=Kannada}" |
| 47 |
); |
| 48 |
testPropertyEscapes( |
| 49 |
/^\p{Script_Extensions=Knda}+$/u, |
| 50 |
matchSymbols, |
| 51 |
"\\p{Script_Extensions=Knda}" |
| 52 |
); |
| 53 |
testPropertyEscapes( |
| 54 |
/^\p{scx=Kannada}+$/u, |
| 55 |
matchSymbols, |
| 56 |
"\\p{scx=Kannada}" |
| 57 |
); |
| 58 |
testPropertyEscapes( |
| 59 |
/^\p{scx=Knda}+$/u, |
| 60 |
matchSymbols, |
| 61 |
"\\p{scx=Knda}" |
| 62 |
); |
| 63 |
|
| 64 |
const nonMatchSymbols = buildString({ |
| 65 |
loneCodePoints: [ |
| 66 |
0x000C8D, |
| 67 |
0x000C91, |
| 68 |
0x000CA9, |
| 69 |
0x000CB4, |
| 70 |
0x000CC5, |
| 71 |
0x000CC9, |
| 72 |
0x000CDF, |
| 73 |
0x000CF0, |
| 74 |
0x001CD1, |
| 75 |
0x001CF3 |
| 76 |
], |
| 77 |
ranges: [ |
| 78 |
[0x00DC00, 0x00DFFF], |
| 79 |
[0x000000, 0x000950], |
| 80 |
[0x000953, 0x000963], |
| 81 |
[0x000966, 0x000C7F], |
| 82 |
[0x000CBA, 0x000CBB], |
| 83 |
[0x000CCE, 0x000CD4], |
| 84 |
[0x000CD7, 0x000CDC], |
| 85 |
[0x000CE4, 0x000CE5], |
| 86 |
[0x000CF4, 0x001CCF], |
| 87 |
[0x001CD4, 0x001CD9], |
| 88 |
[0x001CDB, 0x001CF1], |
| 89 |
[0x001CF5, 0x00A82F], |
| 90 |
[0x00A836, 0x00DBFF], |
| 91 |
[0x00E000, 0x10FFFF] |
| 92 |
] |
| 93 |
}); |
| 94 |
testPropertyEscapes( |
| 95 |
/^\P{Script_Extensions=Kannada}+$/u, |
| 96 |
nonMatchSymbols, |
| 97 |
"\\P{Script_Extensions=Kannada}" |
| 98 |
); |
| 99 |
testPropertyEscapes( |
| 100 |
/^\P{Script_Extensions=Knda}+$/u, |
| 101 |
nonMatchSymbols, |
| 102 |
"\\P{Script_Extensions=Knda}" |
| 103 |
); |
| 104 |
testPropertyEscapes( |
| 105 |
/^\P{scx=Kannada}+$/u, |
| 106 |
nonMatchSymbols, |
| 107 |
"\\P{scx=Kannada}" |
| 108 |
); |
| 109 |
testPropertyEscapes( |
| 110 |
/^\P{scx=Knda}+$/u, |
| 111 |
nonMatchSymbols, |
| 112 |
"\\P{scx=Knda}" |
| 113 |
); |
| 114 |
|
| 115 |
reportCompare(0, 0); |