| 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=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 |
ranges: [ |
| 19 |
[0x000C80, 0x000C8C], |
| 20 |
[0x000C8E, 0x000C90], |
| 21 |
[0x000C92, 0x000CA8], |
| 22 |
[0x000CAA, 0x000CB3], |
| 23 |
[0x000CB5, 0x000CB9], |
| 24 |
[0x000CBC, 0x000CC4], |
| 25 |
[0x000CC6, 0x000CC8], |
| 26 |
[0x000CCA, 0x000CCD], |
| 27 |
[0x000CD5, 0x000CD6], |
| 28 |
[0x000CDD, 0x000CDE], |
| 29 |
[0x000CE0, 0x000CE3], |
| 30 |
[0x000CE6, 0x000CEF], |
| 31 |
[0x000CF1, 0x000CF3] |
| 32 |
] |
| 33 |
}); |
| 34 |
testPropertyEscapes( |
| 35 |
/^\p{Script=Kannada}+$/u, |
| 36 |
matchSymbols, |
| 37 |
"\\p{Script=Kannada}" |
| 38 |
); |
| 39 |
testPropertyEscapes( |
| 40 |
/^\p{Script=Knda}+$/u, |
| 41 |
matchSymbols, |
| 42 |
"\\p{Script=Knda}" |
| 43 |
); |
| 44 |
testPropertyEscapes( |
| 45 |
/^\p{sc=Kannada}+$/u, |
| 46 |
matchSymbols, |
| 47 |
"\\p{sc=Kannada}" |
| 48 |
); |
| 49 |
testPropertyEscapes( |
| 50 |
/^\p{sc=Knda}+$/u, |
| 51 |
matchSymbols, |
| 52 |
"\\p{sc=Knda}" |
| 53 |
); |
| 54 |
|
| 55 |
const nonMatchSymbols = buildString({ |
| 56 |
loneCodePoints: [ |
| 57 |
0x000C8D, |
| 58 |
0x000C91, |
| 59 |
0x000CA9, |
| 60 |
0x000CB4, |
| 61 |
0x000CC5, |
| 62 |
0x000CC9, |
| 63 |
0x000CDF, |
| 64 |
0x000CF0 |
| 65 |
], |
| 66 |
ranges: [ |
| 67 |
[0x00DC00, 0x00DFFF], |
| 68 |
[0x000000, 0x000C7F], |
| 69 |
[0x000CBA, 0x000CBB], |
| 70 |
[0x000CCE, 0x000CD4], |
| 71 |
[0x000CD7, 0x000CDC], |
| 72 |
[0x000CE4, 0x000CE5], |
| 73 |
[0x000CF4, 0x00DBFF], |
| 74 |
[0x00E000, 0x10FFFF] |
| 75 |
] |
| 76 |
}); |
| 77 |
testPropertyEscapes( |
| 78 |
/^\P{Script=Kannada}+$/u, |
| 79 |
nonMatchSymbols, |
| 80 |
"\\P{Script=Kannada}" |
| 81 |
); |
| 82 |
testPropertyEscapes( |
| 83 |
/^\P{Script=Knda}+$/u, |
| 84 |
nonMatchSymbols, |
| 85 |
"\\P{Script=Knda}" |
| 86 |
); |
| 87 |
testPropertyEscapes( |
| 88 |
/^\P{sc=Kannada}+$/u, |
| 89 |
nonMatchSymbols, |
| 90 |
"\\P{sc=Kannada}" |
| 91 |
); |
| 92 |
testPropertyEscapes( |
| 93 |
/^\P{sc=Knda}+$/u, |
| 94 |
nonMatchSymbols, |
| 95 |
"\\P{sc=Knda}" |
| 96 |
); |
| 97 |
|
| 98 |
reportCompare(0, 0); |