| 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=Georgian` |
| 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 |
0x0010C7, |
| 19 |
0x0010CD, |
| 20 |
0x002D27, |
| 21 |
0x002D2D |
| 22 |
], |
| 23 |
ranges: [ |
| 24 |
[0x0010A0, 0x0010C5], |
| 25 |
[0x0010D0, 0x0010FA], |
| 26 |
[0x0010FC, 0x0010FF], |
| 27 |
[0x001C90, 0x001CBA], |
| 28 |
[0x001CBD, 0x001CBF], |
| 29 |
[0x002D00, 0x002D25] |
| 30 |
] |
| 31 |
}); |
| 32 |
testPropertyEscapes( |
| 33 |
/^\p{Script=Georgian}+$/u, |
| 34 |
matchSymbols, |
| 35 |
"\\p{Script=Georgian}" |
| 36 |
); |
| 37 |
testPropertyEscapes( |
| 38 |
/^\p{Script=Geor}+$/u, |
| 39 |
matchSymbols, |
| 40 |
"\\p{Script=Geor}" |
| 41 |
); |
| 42 |
testPropertyEscapes( |
| 43 |
/^\p{sc=Georgian}+$/u, |
| 44 |
matchSymbols, |
| 45 |
"\\p{sc=Georgian}" |
| 46 |
); |
| 47 |
testPropertyEscapes( |
| 48 |
/^\p{sc=Geor}+$/u, |
| 49 |
matchSymbols, |
| 50 |
"\\p{sc=Geor}" |
| 51 |
); |
| 52 |
|
| 53 |
const nonMatchSymbols = buildString({ |
| 54 |
loneCodePoints: [ |
| 55 |
0x0010C6, |
| 56 |
0x0010FB, |
| 57 |
0x002D26 |
| 58 |
], |
| 59 |
ranges: [ |
| 60 |
[0x00DC00, 0x00DFFF], |
| 61 |
[0x000000, 0x00109F], |
| 62 |
[0x0010C8, 0x0010CC], |
| 63 |
[0x0010CE, 0x0010CF], |
| 64 |
[0x001100, 0x001C8F], |
| 65 |
[0x001CBB, 0x001CBC], |
| 66 |
[0x001CC0, 0x002CFF], |
| 67 |
[0x002D28, 0x002D2C], |
| 68 |
[0x002D2E, 0x00DBFF], |
| 69 |
[0x00E000, 0x10FFFF] |
| 70 |
] |
| 71 |
}); |
| 72 |
testPropertyEscapes( |
| 73 |
/^\P{Script=Georgian}+$/u, |
| 74 |
nonMatchSymbols, |
| 75 |
"\\P{Script=Georgian}" |
| 76 |
); |
| 77 |
testPropertyEscapes( |
| 78 |
/^\P{Script=Geor}+$/u, |
| 79 |
nonMatchSymbols, |
| 80 |
"\\P{Script=Geor}" |
| 81 |
); |
| 82 |
testPropertyEscapes( |
| 83 |
/^\P{sc=Georgian}+$/u, |
| 84 |
nonMatchSymbols, |
| 85 |
"\\P{sc=Georgian}" |
| 86 |
); |
| 87 |
testPropertyEscapes( |
| 88 |
/^\P{sc=Geor}+$/u, |
| 89 |
nonMatchSymbols, |
| 90 |
"\\P{sc=Geor}" |
| 91 |
); |
| 92 |
|
| 93 |
reportCompare(0, 0); |