| 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 `Bidi_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 |
0x00061C |
| 20 |
], |
| 21 |
ranges: [ |
| 22 |
[0x00200E, 0x00200F], |
| 23 |
[0x00202A, 0x00202E], |
| 24 |
[0x002066, 0x002069] |
| 25 |
] |
| 26 |
}); |
| 27 |
testPropertyEscapes( |
| 28 |
/^\p{Bidi_Control}+$/u, |
| 29 |
matchSymbols, |
| 30 |
"\\p{Bidi_Control}" |
| 31 |
); |
| 32 |
testPropertyEscapes( |
| 33 |
/^\p{Bidi_C}+$/u, |
| 34 |
matchSymbols, |
| 35 |
"\\p{Bidi_C}" |
| 36 |
); |
| 37 |
|
| 38 |
const nonMatchSymbols = buildString({ |
| 39 |
loneCodePoints: [], |
| 40 |
ranges: [ |
| 41 |
[0x00DC00, 0x00DFFF], |
| 42 |
[0x000000, 0x00061B], |
| 43 |
[0x00061D, 0x00200D], |
| 44 |
[0x002010, 0x002029], |
| 45 |
[0x00202F, 0x002065], |
| 46 |
[0x00206A, 0x00DBFF], |
| 47 |
[0x00E000, 0x10FFFF] |
| 48 |
] |
| 49 |
}); |
| 50 |
testPropertyEscapes( |
| 51 |
/^\P{Bidi_Control}+$/u, |
| 52 |
nonMatchSymbols, |
| 53 |
"\\P{Bidi_Control}" |
| 54 |
); |
| 55 |
testPropertyEscapes( |
| 56 |
/^\P{Bidi_C}+$/u, |
| 57 |
nonMatchSymbols, |
| 58 |
"\\P{Bidi_C}" |
| 59 |
); |