| 1 |
// Copyright 2017 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 `Quotation_Mark` |
| 8 |
info: | |
| 9 |
Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests |
| 10 |
Unicode v10.0.0 |
| 11 |
Emoji v5.0 (UTR51) |
| 12 |
esid: sec-static-semantics-unicodematchproperty-p |
| 13 |
features: [regexp-unicode-property-escapes] |
| 14 |
includes: [regExpUtils.js] |
| 15 |
---*/ |
| 16 |
|
| 17 |
const matchSymbols = buildString({ |
| 18 |
loneCodePoints: [ |
| 19 |
0x000022, |
| 20 |
0x000027, |
| 21 |
0x0000AB, |
| 22 |
0x0000BB, |
| 23 |
0x002E42, |
| 24 |
0x00FF02, |
| 25 |
0x00FF07 |
| 26 |
], |
| 27 |
ranges: [ |
| 28 |
[0x002018, 0x00201F], |
| 29 |
[0x002039, 0x00203A], |
| 30 |
[0x00300C, 0x00300F], |
| 31 |
[0x00301D, 0x00301F], |
| 32 |
[0x00FE41, 0x00FE44], |
| 33 |
[0x00FF62, 0x00FF63] |
| 34 |
] |
| 35 |
}); |
| 36 |
testPropertyEscapes( |
| 37 |
/^\p{Quotation_Mark}+$/u, |
| 38 |
matchSymbols, |
| 39 |
"\\p{Quotation_Mark}" |
| 40 |
); |
| 41 |
testPropertyEscapes( |
| 42 |
/^\p{QMark}+$/u, |
| 43 |
matchSymbols, |
| 44 |
"\\p{QMark}" |
| 45 |
); |
| 46 |
|
| 47 |
const nonMatchSymbols = buildString({ |
| 48 |
loneCodePoints: [], |
| 49 |
ranges: [ |
| 50 |
[0x00DC00, 0x00DFFF], |
| 51 |
[0x000000, 0x000021], |
| 52 |
[0x000023, 0x000026], |
| 53 |
[0x000028, 0x0000AA], |
| 54 |
[0x0000AC, 0x0000BA], |
| 55 |
[0x0000BC, 0x002017], |
| 56 |
[0x002020, 0x002038], |
| 57 |
[0x00203B, 0x002E41], |
| 58 |
[0x002E43, 0x00300B], |
| 59 |
[0x003010, 0x00301C], |
| 60 |
[0x003020, 0x00DBFF], |
| 61 |
[0x00E000, 0x00FE40], |
| 62 |
[0x00FE45, 0x00FF01], |
| 63 |
[0x00FF03, 0x00FF06], |
| 64 |
[0x00FF08, 0x00FF61], |
| 65 |
[0x00FF64, 0x10FFFF] |
| 66 |
] |
| 67 |
}); |
| 68 |
testPropertyEscapes( |
| 69 |
/^\P{Quotation_Mark}+$/u, |
| 70 |
nonMatchSymbols, |
| 71 |
"\\P{Quotation_Mark}" |
| 72 |
); |
| 73 |
testPropertyEscapes( |
| 74 |
/^\P{QMark}+$/u, |
| 75 |
nonMatchSymbols, |
| 76 |
"\\P{QMark}" |
| 77 |
); |