| 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=Inherited` |
| 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 |
0x00030F, |
| 19 |
0x000312, |
| 20 |
0x00032F, |
| 21 |
0x001DF9, |
| 22 |
0x0101FD |
| 23 |
], |
| 24 |
ranges: [ |
| 25 |
[0x000314, 0x00031F], |
| 26 |
[0x000321, 0x000322], |
| 27 |
[0x000326, 0x00032C], |
| 28 |
[0x000332, 0x000341], |
| 29 |
[0x000343, 0x000344], |
| 30 |
[0x000346, 0x000357], |
| 31 |
[0x000359, 0x00035D], |
| 32 |
[0x00035F, 0x000362], |
| 33 |
[0x000953, 0x000954], |
| 34 |
[0x001AB0, 0x001ACE], |
| 35 |
[0x001DC2, 0x001DF7], |
| 36 |
[0x001DFB, 0x001DFF], |
| 37 |
[0x00200C, 0x00200D], |
| 38 |
[0x0020D0, 0x0020EF], |
| 39 |
[0x00FE00, 0x00FE0F], |
| 40 |
[0x00FE20, 0x00FE2D], |
| 41 |
[0x01CF00, 0x01CF2D], |
| 42 |
[0x01CF30, 0x01CF46], |
| 43 |
[0x01D167, 0x01D169], |
| 44 |
[0x01D17B, 0x01D182], |
| 45 |
[0x01D185, 0x01D18B], |
| 46 |
[0x01D1AA, 0x01D1AD], |
| 47 |
[0x0E0100, 0x0E01EF] |
| 48 |
] |
| 49 |
}); |
| 50 |
testPropertyEscapes( |
| 51 |
/^\p{Script_Extensions=Inherited}+$/u, |
| 52 |
matchSymbols, |
| 53 |
"\\p{Script_Extensions=Inherited}" |
| 54 |
); |
| 55 |
testPropertyEscapes( |
| 56 |
/^\p{Script_Extensions=Zinh}+$/u, |
| 57 |
matchSymbols, |
| 58 |
"\\p{Script_Extensions=Zinh}" |
| 59 |
); |
| 60 |
testPropertyEscapes( |
| 61 |
/^\p{Script_Extensions=Qaai}+$/u, |
| 62 |
matchSymbols, |
| 63 |
"\\p{Script_Extensions=Qaai}" |
| 64 |
); |
| 65 |
testPropertyEscapes( |
| 66 |
/^\p{scx=Inherited}+$/u, |
| 67 |
matchSymbols, |
| 68 |
"\\p{scx=Inherited}" |
| 69 |
); |
| 70 |
testPropertyEscapes( |
| 71 |
/^\p{scx=Zinh}+$/u, |
| 72 |
matchSymbols, |
| 73 |
"\\p{scx=Zinh}" |
| 74 |
); |
| 75 |
testPropertyEscapes( |
| 76 |
/^\p{scx=Qaai}+$/u, |
| 77 |
matchSymbols, |
| 78 |
"\\p{scx=Qaai}" |
| 79 |
); |
| 80 |
|
| 81 |
const nonMatchSymbols = buildString({ |
| 82 |
loneCodePoints: [ |
| 83 |
0x000313, |
| 84 |
0x000320, |
| 85 |
0x000342, |
| 86 |
0x000345, |
| 87 |
0x000358, |
| 88 |
0x00035E, |
| 89 |
0x001DF8, |
| 90 |
0x001DFA |
| 91 |
], |
| 92 |
ranges: [ |
| 93 |
[0x00DC00, 0x00DFFF], |
| 94 |
[0x000000, 0x00030E], |
| 95 |
[0x000310, 0x000311], |
| 96 |
[0x000323, 0x000325], |
| 97 |
[0x00032D, 0x00032E], |
| 98 |
[0x000330, 0x000331], |
| 99 |
[0x000363, 0x000952], |
| 100 |
[0x000955, 0x001AAF], |
| 101 |
[0x001ACF, 0x001DC1], |
| 102 |
[0x001E00, 0x00200B], |
| 103 |
[0x00200E, 0x0020CF], |
| 104 |
[0x0020F0, 0x00DBFF], |
| 105 |
[0x00E000, 0x00FDFF], |
| 106 |
[0x00FE10, 0x00FE1F], |
| 107 |
[0x00FE2E, 0x0101FC], |
| 108 |
[0x0101FE, 0x01CEFF], |
| 109 |
[0x01CF2E, 0x01CF2F], |
| 110 |
[0x01CF47, 0x01D166], |
| 111 |
[0x01D16A, 0x01D17A], |
| 112 |
[0x01D183, 0x01D184], |
| 113 |
[0x01D18C, 0x01D1A9], |
| 114 |
[0x01D1AE, 0x0E00FF], |
| 115 |
[0x0E01F0, 0x10FFFF] |
| 116 |
] |
| 117 |
}); |
| 118 |
testPropertyEscapes( |
| 119 |
/^\P{Script_Extensions=Inherited}+$/u, |
| 120 |
nonMatchSymbols, |
| 121 |
"\\P{Script_Extensions=Inherited}" |
| 122 |
); |
| 123 |
testPropertyEscapes( |
| 124 |
/^\P{Script_Extensions=Zinh}+$/u, |
| 125 |
nonMatchSymbols, |
| 126 |
"\\P{Script_Extensions=Zinh}" |
| 127 |
); |
| 128 |
testPropertyEscapes( |
| 129 |
/^\P{Script_Extensions=Qaai}+$/u, |
| 130 |
nonMatchSymbols, |
| 131 |
"\\P{Script_Extensions=Qaai}" |
| 132 |
); |
| 133 |
testPropertyEscapes( |
| 134 |
/^\P{scx=Inherited}+$/u, |
| 135 |
nonMatchSymbols, |
| 136 |
"\\P{scx=Inherited}" |
| 137 |
); |
| 138 |
testPropertyEscapes( |
| 139 |
/^\P{scx=Zinh}+$/u, |
| 140 |
nonMatchSymbols, |
| 141 |
"\\P{scx=Zinh}" |
| 142 |
); |
| 143 |
testPropertyEscapes( |
| 144 |
/^\P{scx=Qaai}+$/u, |
| 145 |
nonMatchSymbols, |
| 146 |
"\\P{scx=Qaai}" |
| 147 |
); |
| 148 |
|
| 149 |
reportCompare(0, 0); |