| 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=Coptic` |
| 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 |
0x0000B7, |
| 19 |
0x000300, |
| 20 |
0x000307, |
| 21 |
0x002E17 |
| 22 |
], |
| 23 |
ranges: [ |
| 24 |
[0x000304, 0x000305], |
| 25 |
[0x000374, 0x000375], |
| 26 |
[0x0003E2, 0x0003EF], |
| 27 |
[0x002C80, 0x002CF3], |
| 28 |
[0x002CF9, 0x002CFF], |
| 29 |
[0x0102E0, 0x0102FB] |
| 30 |
] |
| 31 |
}); |
| 32 |
testPropertyEscapes( |
| 33 |
/^\p{Script_Extensions=Coptic}+$/u, |
| 34 |
matchSymbols, |
| 35 |
"\\p{Script_Extensions=Coptic}" |
| 36 |
); |
| 37 |
testPropertyEscapes( |
| 38 |
/^\p{Script_Extensions=Copt}+$/u, |
| 39 |
matchSymbols, |
| 40 |
"\\p{Script_Extensions=Copt}" |
| 41 |
); |
| 42 |
testPropertyEscapes( |
| 43 |
/^\p{Script_Extensions=Qaac}+$/u, |
| 44 |
matchSymbols, |
| 45 |
"\\p{Script_Extensions=Qaac}" |
| 46 |
); |
| 47 |
testPropertyEscapes( |
| 48 |
/^\p{scx=Coptic}+$/u, |
| 49 |
matchSymbols, |
| 50 |
"\\p{scx=Coptic}" |
| 51 |
); |
| 52 |
testPropertyEscapes( |
| 53 |
/^\p{scx=Copt}+$/u, |
| 54 |
matchSymbols, |
| 55 |
"\\p{scx=Copt}" |
| 56 |
); |
| 57 |
testPropertyEscapes( |
| 58 |
/^\p{scx=Qaac}+$/u, |
| 59 |
matchSymbols, |
| 60 |
"\\p{scx=Qaac}" |
| 61 |
); |
| 62 |
|
| 63 |
const nonMatchSymbols = buildString({ |
| 64 |
loneCodePoints: [ |
| 65 |
0x000306 |
| 66 |
], |
| 67 |
ranges: [ |
| 68 |
[0x00DC00, 0x00DFFF], |
| 69 |
[0x000000, 0x0000B6], |
| 70 |
[0x0000B8, 0x0002FF], |
| 71 |
[0x000301, 0x000303], |
| 72 |
[0x000308, 0x000373], |
| 73 |
[0x000376, 0x0003E1], |
| 74 |
[0x0003F0, 0x002C7F], |
| 75 |
[0x002CF4, 0x002CF8], |
| 76 |
[0x002D00, 0x002E16], |
| 77 |
[0x002E18, 0x00DBFF], |
| 78 |
[0x00E000, 0x0102DF], |
| 79 |
[0x0102FC, 0x10FFFF] |
| 80 |
] |
| 81 |
}); |
| 82 |
testPropertyEscapes( |
| 83 |
/^\P{Script_Extensions=Coptic}+$/u, |
| 84 |
nonMatchSymbols, |
| 85 |
"\\P{Script_Extensions=Coptic}" |
| 86 |
); |
| 87 |
testPropertyEscapes( |
| 88 |
/^\P{Script_Extensions=Copt}+$/u, |
| 89 |
nonMatchSymbols, |
| 90 |
"\\P{Script_Extensions=Copt}" |
| 91 |
); |
| 92 |
testPropertyEscapes( |
| 93 |
/^\P{Script_Extensions=Qaac}+$/u, |
| 94 |
nonMatchSymbols, |
| 95 |
"\\P{Script_Extensions=Qaac}" |
| 96 |
); |
| 97 |
testPropertyEscapes( |
| 98 |
/^\P{scx=Coptic}+$/u, |
| 99 |
nonMatchSymbols, |
| 100 |
"\\P{scx=Coptic}" |
| 101 |
); |
| 102 |
testPropertyEscapes( |
| 103 |
/^\P{scx=Copt}+$/u, |
| 104 |
nonMatchSymbols, |
| 105 |
"\\P{scx=Copt}" |
| 106 |
); |
| 107 |
testPropertyEscapes( |
| 108 |
/^\P{scx=Qaac}+$/u, |
| 109 |
nonMatchSymbols, |
| 110 |
"\\P{scx=Qaac}" |
| 111 |
); |
| 112 |
|
| 113 |
reportCompare(0, 0); |