| 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 `Join_Control` |
| 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 |
ranges: [ |
| 20 |
[0x00200C, 0x00200D] |
| 21 |
] |
| 22 |
}); |
| 23 |
testPropertyEscapes( |
| 24 |
/^\p{Join_Control}+$/u, |
| 25 |
matchSymbols, |
| 26 |
"\\p{Join_Control}" |
| 27 |
); |
| 28 |
testPropertyEscapes( |
| 29 |
/^\p{Join_C}+$/u, |
| 30 |
matchSymbols, |
| 31 |
"\\p{Join_C}" |
| 32 |
); |
| 33 |
|
| 34 |
const nonMatchSymbols = buildString({ |
| 35 |
loneCodePoints: [], |
| 36 |
ranges: [ |
| 37 |
[0x00DC00, 0x00DFFF], |
| 38 |
[0x000000, 0x00200B], |
| 39 |
[0x00200E, 0x00DBFF], |
| 40 |
[0x00E000, 0x10FFFF] |
| 41 |
] |
| 42 |
}); |
| 43 |
testPropertyEscapes( |
| 44 |
/^\P{Join_Control}+$/u, |
| 45 |
nonMatchSymbols, |
| 46 |
"\\P{Join_Control}" |
| 47 |
); |
| 48 |
testPropertyEscapes( |
| 49 |
/^\P{Join_C}+$/u, |
| 50 |
nonMatchSymbols, |
| 51 |
"\\P{Join_C}" |
| 52 |
); |