| 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=Sunuwar` |
| 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 |
[0x011BC0, 0x011BE1], |
| 20 |
[0x011BF0, 0x011BF9] |
| 21 |
] |
| 22 |
}); |
| 23 |
testPropertyEscapes( |
| 24 |
/^\p{Script=Sunuwar}+$/u, |
| 25 |
matchSymbols, |
| 26 |
"\\p{Script=Sunuwar}" |
| 27 |
); |
| 28 |
testPropertyEscapes( |
| 29 |
/^\p{Script=Sunu}+$/u, |
| 30 |
matchSymbols, |
| 31 |
"\\p{Script=Sunu}" |
| 32 |
); |
| 33 |
testPropertyEscapes( |
| 34 |
/^\p{sc=Sunuwar}+$/u, |
| 35 |
matchSymbols, |
| 36 |
"\\p{sc=Sunuwar}" |
| 37 |
); |
| 38 |
testPropertyEscapes( |
| 39 |
/^\p{sc=Sunu}+$/u, |
| 40 |
matchSymbols, |
| 41 |
"\\p{sc=Sunu}" |
| 42 |
); |
| 43 |
|
| 44 |
const nonMatchSymbols = buildString({ |
| 45 |
loneCodePoints: [], |
| 46 |
ranges: [ |
| 47 |
[0x00DC00, 0x00DFFF], |
| 48 |
[0x000000, 0x00DBFF], |
| 49 |
[0x00E000, 0x011BBF], |
| 50 |
[0x011BE2, 0x011BEF], |
| 51 |
[0x011BFA, 0x10FFFF] |
| 52 |
] |
| 53 |
}); |
| 54 |
testPropertyEscapes( |
| 55 |
/^\P{Script=Sunuwar}+$/u, |
| 56 |
nonMatchSymbols, |
| 57 |
"\\P{Script=Sunuwar}" |
| 58 |
); |
| 59 |
testPropertyEscapes( |
| 60 |
/^\P{Script=Sunu}+$/u, |
| 61 |
nonMatchSymbols, |
| 62 |
"\\P{Script=Sunu}" |
| 63 |
); |
| 64 |
testPropertyEscapes( |
| 65 |
/^\P{sc=Sunuwar}+$/u, |
| 66 |
nonMatchSymbols, |
| 67 |
"\\P{sc=Sunuwar}" |
| 68 |
); |
| 69 |
testPropertyEscapes( |
| 70 |
/^\P{sc=Sunu}+$/u, |
| 71 |
nonMatchSymbols, |
| 72 |
"\\P{sc=Sunu}" |
| 73 |
); |
| 74 |
|
| 75 |
reportCompare(0, 0); |