| 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 `Ideographic` |
| 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 |
0x016FE4 |
| 19 |
], |
| 20 |
ranges: [ |
| 21 |
[0x003006, 0x003007], |
| 22 |
[0x003021, 0x003029], |
| 23 |
[0x003038, 0x00303A], |
| 24 |
[0x003400, 0x004DBF], |
| 25 |
[0x004E00, 0x009FFF], |
| 26 |
[0x00F900, 0x00FA6D], |
| 27 |
[0x00FA70, 0x00FAD9], |
| 28 |
[0x017000, 0x0187F7], |
| 29 |
[0x018800, 0x018CD5], |
| 30 |
[0x018CFF, 0x018D08], |
| 31 |
[0x01B170, 0x01B2FB], |
| 32 |
[0x020000, 0x02A6DF], |
| 33 |
[0x02A700, 0x02B739], |
| 34 |
[0x02B740, 0x02B81D], |
| 35 |
[0x02B820, 0x02CEA1], |
| 36 |
[0x02CEB0, 0x02EBE0], |
| 37 |
[0x02EBF0, 0x02EE5D], |
| 38 |
[0x02F800, 0x02FA1D], |
| 39 |
[0x030000, 0x03134A], |
| 40 |
[0x031350, 0x0323AF] |
| 41 |
] |
| 42 |
}); |
| 43 |
testPropertyEscapes( |
| 44 |
/^\p{Ideographic}+$/u, |
| 45 |
matchSymbols, |
| 46 |
"\\p{Ideographic}" |
| 47 |
); |
| 48 |
testPropertyEscapes( |
| 49 |
/^\p{Ideo}+$/u, |
| 50 |
matchSymbols, |
| 51 |
"\\p{Ideo}" |
| 52 |
); |
| 53 |
|
| 54 |
const nonMatchSymbols = buildString({ |
| 55 |
loneCodePoints: [], |
| 56 |
ranges: [ |
| 57 |
[0x00DC00, 0x00DFFF], |
| 58 |
[0x000000, 0x003005], |
| 59 |
[0x003008, 0x003020], |
| 60 |
[0x00302A, 0x003037], |
| 61 |
[0x00303B, 0x0033FF], |
| 62 |
[0x004DC0, 0x004DFF], |
| 63 |
[0x00A000, 0x00DBFF], |
| 64 |
[0x00E000, 0x00F8FF], |
| 65 |
[0x00FA6E, 0x00FA6F], |
| 66 |
[0x00FADA, 0x016FE3], |
| 67 |
[0x016FE5, 0x016FFF], |
| 68 |
[0x0187F8, 0x0187FF], |
| 69 |
[0x018CD6, 0x018CFE], |
| 70 |
[0x018D09, 0x01B16F], |
| 71 |
[0x01B2FC, 0x01FFFF], |
| 72 |
[0x02A6E0, 0x02A6FF], |
| 73 |
[0x02B73A, 0x02B73F], |
| 74 |
[0x02B81E, 0x02B81F], |
| 75 |
[0x02CEA2, 0x02CEAF], |
| 76 |
[0x02EBE1, 0x02EBEF], |
| 77 |
[0x02EE5E, 0x02F7FF], |
| 78 |
[0x02FA1E, 0x02FFFF], |
| 79 |
[0x03134B, 0x03134F], |
| 80 |
[0x0323B0, 0x10FFFF] |
| 81 |
] |
| 82 |
}); |
| 83 |
testPropertyEscapes( |
| 84 |
/^\P{Ideographic}+$/u, |
| 85 |
nonMatchSymbols, |
| 86 |
"\\P{Ideographic}" |
| 87 |
); |
| 88 |
testPropertyEscapes( |
| 89 |
/^\P{Ideo}+$/u, |
| 90 |
nonMatchSymbols, |
| 91 |
"\\P{Ideo}" |
| 92 |
); |
| 93 |
|
| 94 |
reportCompare(0, 0); |