| 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=Greek` |
| 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 |
0x000304, |
| 20 |
0x000306, |
| 21 |
0x000308, |
| 22 |
0x000313, |
| 23 |
0x000342, |
| 24 |
0x000345, |
| 25 |
0x00037F, |
| 26 |
0x000384, |
| 27 |
0x000386, |
| 28 |
0x00038C, |
| 29 |
0x001F59, |
| 30 |
0x001F5B, |
| 31 |
0x001F5D, |
| 32 |
0x00205D, |
| 33 |
0x002126, |
| 34 |
0x00AB65, |
| 35 |
0x0101A0 |
| 36 |
], |
| 37 |
ranges: [ |
| 38 |
[0x000300, 0x000301], |
| 39 |
[0x000370, 0x000377], |
| 40 |
[0x00037A, 0x00037D], |
| 41 |
[0x000388, 0x00038A], |
| 42 |
[0x00038E, 0x0003A1], |
| 43 |
[0x0003A3, 0x0003E1], |
| 44 |
[0x0003F0, 0x0003FF], |
| 45 |
[0x001D26, 0x001D2A], |
| 46 |
[0x001D5D, 0x001D61], |
| 47 |
[0x001D66, 0x001D6A], |
| 48 |
[0x001DBF, 0x001DC1], |
| 49 |
[0x001F00, 0x001F15], |
| 50 |
[0x001F18, 0x001F1D], |
| 51 |
[0x001F20, 0x001F45], |
| 52 |
[0x001F48, 0x001F4D], |
| 53 |
[0x001F50, 0x001F57], |
| 54 |
[0x001F5F, 0x001F7D], |
| 55 |
[0x001F80, 0x001FB4], |
| 56 |
[0x001FB6, 0x001FC4], |
| 57 |
[0x001FC6, 0x001FD3], |
| 58 |
[0x001FD6, 0x001FDB], |
| 59 |
[0x001FDD, 0x001FEF], |
| 60 |
[0x001FF2, 0x001FF4], |
| 61 |
[0x001FF6, 0x001FFE], |
| 62 |
[0x010140, 0x01018E], |
| 63 |
[0x01D200, 0x01D245] |
| 64 |
] |
| 65 |
}); |
| 66 |
testPropertyEscapes( |
| 67 |
/^\p{Script_Extensions=Greek}+$/u, |
| 68 |
matchSymbols, |
| 69 |
"\\p{Script_Extensions=Greek}" |
| 70 |
); |
| 71 |
testPropertyEscapes( |
| 72 |
/^\p{Script_Extensions=Grek}+$/u, |
| 73 |
matchSymbols, |
| 74 |
"\\p{Script_Extensions=Grek}" |
| 75 |
); |
| 76 |
testPropertyEscapes( |
| 77 |
/^\p{scx=Greek}+$/u, |
| 78 |
matchSymbols, |
| 79 |
"\\p{scx=Greek}" |
| 80 |
); |
| 81 |
testPropertyEscapes( |
| 82 |
/^\p{scx=Grek}+$/u, |
| 83 |
matchSymbols, |
| 84 |
"\\p{scx=Grek}" |
| 85 |
); |
| 86 |
|
| 87 |
const nonMatchSymbols = buildString({ |
| 88 |
loneCodePoints: [ |
| 89 |
0x000305, |
| 90 |
0x000307, |
| 91 |
0x00037E, |
| 92 |
0x000385, |
| 93 |
0x000387, |
| 94 |
0x00038B, |
| 95 |
0x00038D, |
| 96 |
0x0003A2, |
| 97 |
0x001F58, |
| 98 |
0x001F5A, |
| 99 |
0x001F5C, |
| 100 |
0x001F5E, |
| 101 |
0x001FB5, |
| 102 |
0x001FC5, |
| 103 |
0x001FDC, |
| 104 |
0x001FF5 |
| 105 |
], |
| 106 |
ranges: [ |
| 107 |
[0x00DC00, 0x00DFFF], |
| 108 |
[0x000000, 0x0000B6], |
| 109 |
[0x0000B8, 0x0002FF], |
| 110 |
[0x000302, 0x000303], |
| 111 |
[0x000309, 0x000312], |
| 112 |
[0x000314, 0x000341], |
| 113 |
[0x000343, 0x000344], |
| 114 |
[0x000346, 0x00036F], |
| 115 |
[0x000378, 0x000379], |
| 116 |
[0x000380, 0x000383], |
| 117 |
[0x0003E2, 0x0003EF], |
| 118 |
[0x000400, 0x001D25], |
| 119 |
[0x001D2B, 0x001D5C], |
| 120 |
[0x001D62, 0x001D65], |
| 121 |
[0x001D6B, 0x001DBE], |
| 122 |
[0x001DC2, 0x001EFF], |
| 123 |
[0x001F16, 0x001F17], |
| 124 |
[0x001F1E, 0x001F1F], |
| 125 |
[0x001F46, 0x001F47], |
| 126 |
[0x001F4E, 0x001F4F], |
| 127 |
[0x001F7E, 0x001F7F], |
| 128 |
[0x001FD4, 0x001FD5], |
| 129 |
[0x001FF0, 0x001FF1], |
| 130 |
[0x001FFF, 0x00205C], |
| 131 |
[0x00205E, 0x002125], |
| 132 |
[0x002127, 0x00AB64], |
| 133 |
[0x00AB66, 0x00DBFF], |
| 134 |
[0x00E000, 0x01013F], |
| 135 |
[0x01018F, 0x01019F], |
| 136 |
[0x0101A1, 0x01D1FF], |
| 137 |
[0x01D246, 0x10FFFF] |
| 138 |
] |
| 139 |
}); |
| 140 |
testPropertyEscapes( |
| 141 |
/^\P{Script_Extensions=Greek}+$/u, |
| 142 |
nonMatchSymbols, |
| 143 |
"\\P{Script_Extensions=Greek}" |
| 144 |
); |
| 145 |
testPropertyEscapes( |
| 146 |
/^\P{Script_Extensions=Grek}+$/u, |
| 147 |
nonMatchSymbols, |
| 148 |
"\\P{Script_Extensions=Grek}" |
| 149 |
); |
| 150 |
testPropertyEscapes( |
| 151 |
/^\P{scx=Greek}+$/u, |
| 152 |
nonMatchSymbols, |
| 153 |
"\\P{scx=Greek}" |
| 154 |
); |
| 155 |
testPropertyEscapes( |
| 156 |
/^\P{scx=Grek}+$/u, |
| 157 |
nonMatchSymbols, |
| 158 |
"\\P{scx=Grek}" |
| 159 |
); |
| 160 |
|
| 161 |
reportCompare(0, 0); |