| 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 `Extender` |
| 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 |
0x000640, |
| 20 |
0x0007FA, |
| 21 |
0x000A71, |
| 22 |
0x000AFB, |
| 23 |
0x000B55, |
| 24 |
0x000E46, |
| 25 |
0x000EC6, |
| 26 |
0x00180A, |
| 27 |
0x001843, |
| 28 |
0x001AA7, |
| 29 |
0x001C36, |
| 30 |
0x001C7B, |
| 31 |
0x003005, |
| 32 |
0x00A015, |
| 33 |
0x00A60C, |
| 34 |
0x00A9CF, |
| 35 |
0x00A9E6, |
| 36 |
0x00AA70, |
| 37 |
0x00AADD, |
| 38 |
0x00FF70, |
| 39 |
0x010D4E, |
| 40 |
0x010D6A, |
| 41 |
0x010D6F, |
| 42 |
0x011237, |
| 43 |
0x01135D, |
| 44 |
0x011A98, |
| 45 |
0x016FE3, |
| 46 |
0x01E5EF |
| 47 |
], |
| 48 |
ranges: [ |
| 49 |
[0x0002D0, 0x0002D1], |
| 50 |
[0x003031, 0x003035], |
| 51 |
[0x00309D, 0x00309E], |
| 52 |
[0x0030FC, 0x0030FE], |
| 53 |
[0x00AAF3, 0x00AAF4], |
| 54 |
[0x010781, 0x010782], |
| 55 |
[0x0113D2, 0x0113D3], |
| 56 |
[0x0115C6, 0x0115C8], |
| 57 |
[0x016B42, 0x016B43], |
| 58 |
[0x016FE0, 0x016FE1], |
| 59 |
[0x01E13C, 0x01E13D], |
| 60 |
[0x01E944, 0x01E946] |
| 61 |
] |
| 62 |
}); |
| 63 |
testPropertyEscapes( |
| 64 |
/^\p{Extender}+$/u, |
| 65 |
matchSymbols, |
| 66 |
"\\p{Extender}" |
| 67 |
); |
| 68 |
testPropertyEscapes( |
| 69 |
/^\p{Ext}+$/u, |
| 70 |
matchSymbols, |
| 71 |
"\\p{Ext}" |
| 72 |
); |
| 73 |
|
| 74 |
const nonMatchSymbols = buildString({ |
| 75 |
loneCodePoints: [ |
| 76 |
0x016FE2 |
| 77 |
], |
| 78 |
ranges: [ |
| 79 |
[0x00DC00, 0x00DFFF], |
| 80 |
[0x000000, 0x0000B6], |
| 81 |
[0x0000B8, 0x0002CF], |
| 82 |
[0x0002D2, 0x00063F], |
| 83 |
[0x000641, 0x0007F9], |
| 84 |
[0x0007FB, 0x000A70], |
| 85 |
[0x000A72, 0x000AFA], |
| 86 |
[0x000AFC, 0x000B54], |
| 87 |
[0x000B56, 0x000E45], |
| 88 |
[0x000E47, 0x000EC5], |
| 89 |
[0x000EC7, 0x001809], |
| 90 |
[0x00180B, 0x001842], |
| 91 |
[0x001844, 0x001AA6], |
| 92 |
[0x001AA8, 0x001C35], |
| 93 |
[0x001C37, 0x001C7A], |
| 94 |
[0x001C7C, 0x003004], |
| 95 |
[0x003006, 0x003030], |
| 96 |
[0x003036, 0x00309C], |
| 97 |
[0x00309F, 0x0030FB], |
| 98 |
[0x0030FF, 0x00A014], |
| 99 |
[0x00A016, 0x00A60B], |
| 100 |
[0x00A60D, 0x00A9CE], |
| 101 |
[0x00A9D0, 0x00A9E5], |
| 102 |
[0x00A9E7, 0x00AA6F], |
| 103 |
[0x00AA71, 0x00AADC], |
| 104 |
[0x00AADE, 0x00AAF2], |
| 105 |
[0x00AAF5, 0x00DBFF], |
| 106 |
[0x00E000, 0x00FF6F], |
| 107 |
[0x00FF71, 0x010780], |
| 108 |
[0x010783, 0x010D4D], |
| 109 |
[0x010D4F, 0x010D69], |
| 110 |
[0x010D6B, 0x010D6E], |
| 111 |
[0x010D70, 0x011236], |
| 112 |
[0x011238, 0x01135C], |
| 113 |
[0x01135E, 0x0113D1], |
| 114 |
[0x0113D4, 0x0115C5], |
| 115 |
[0x0115C9, 0x011A97], |
| 116 |
[0x011A99, 0x016B41], |
| 117 |
[0x016B44, 0x016FDF], |
| 118 |
[0x016FE4, 0x01E13B], |
| 119 |
[0x01E13E, 0x01E5EE], |
| 120 |
[0x01E5F0, 0x01E943], |
| 121 |
[0x01E947, 0x10FFFF] |
| 122 |
] |
| 123 |
}); |
| 124 |
testPropertyEscapes( |
| 125 |
/^\P{Extender}+$/u, |
| 126 |
nonMatchSymbols, |
| 127 |
"\\P{Extender}" |
| 128 |
); |
| 129 |
testPropertyEscapes( |
| 130 |
/^\P{Ext}+$/u, |
| 131 |
nonMatchSymbols, |
| 132 |
"\\P{Ext}" |
| 133 |
); |
| 134 |
|
| 135 |
reportCompare(0, 0); |