2020-03-11 21:53:16 +01:00
|
|
|
// Copyright 2020 Mathias Bynens. All rights reserved.
|
2017-04-13 17:22:49 +02:00
|
|
|
// This code is governed by the BSD license found in the LICENSE file.
|
|
|
|
|
|
|
|
/*---
|
|
|
|
author: Mathias Bynens
|
|
|
|
description: >
|
|
|
|
Unicode property escapes for `Ideographic`
|
|
|
|
info: |
|
|
|
|
Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests
|
2020-03-11 21:53:16 +01:00
|
|
|
Unicode v13.0.0
|
2017-04-13 17:22:49 +02:00
|
|
|
esid: sec-static-semantics-unicodematchproperty-p
|
|
|
|
features: [regexp-unicode-property-escapes]
|
|
|
|
includes: [regExpUtils.js]
|
|
|
|
---*/
|
|
|
|
|
|
|
|
const matchSymbols = buildString({
|
2020-03-11 21:53:16 +01:00
|
|
|
loneCodePoints: [
|
|
|
|
0x016FE4
|
|
|
|
],
|
2017-04-13 17:22:49 +02:00
|
|
|
ranges: [
|
|
|
|
[0x003006, 0x003007],
|
|
|
|
[0x003021, 0x003029],
|
|
|
|
[0x003038, 0x00303A],
|
2020-03-11 21:53:16 +01:00
|
|
|
[0x003400, 0x004DBF],
|
|
|
|
[0x004E00, 0x009FFC],
|
2017-04-13 17:22:49 +02:00
|
|
|
[0x00F900, 0x00FA6D],
|
|
|
|
[0x00FA70, 0x00FAD9],
|
2019-03-12 09:47:27 +01:00
|
|
|
[0x017000, 0x0187F7],
|
2020-03-11 21:53:16 +01:00
|
|
|
[0x018800, 0x018CD5],
|
|
|
|
[0x018D00, 0x018D08],
|
2017-07-05 09:43:09 +02:00
|
|
|
[0x01B170, 0x01B2FB],
|
2020-03-11 21:53:16 +01:00
|
|
|
[0x020000, 0x02A6DD],
|
2017-04-13 17:22:49 +02:00
|
|
|
[0x02A700, 0x02B734],
|
|
|
|
[0x02B740, 0x02B81D],
|
|
|
|
[0x02B820, 0x02CEA1],
|
2017-07-05 09:43:09 +02:00
|
|
|
[0x02CEB0, 0x02EBE0],
|
2020-03-11 21:53:16 +01:00
|
|
|
[0x02F800, 0x02FA1D],
|
|
|
|
[0x030000, 0x03134A]
|
2017-04-13 17:22:49 +02:00
|
|
|
]
|
|
|
|
});
|
|
|
|
testPropertyEscapes(
|
|
|
|
/^\p{Ideographic}+$/u,
|
|
|
|
matchSymbols,
|
|
|
|
"\\p{Ideographic}"
|
|
|
|
);
|
|
|
|
testPropertyEscapes(
|
|
|
|
/^\p{Ideo}+$/u,
|
|
|
|
matchSymbols,
|
|
|
|
"\\p{Ideo}"
|
|
|
|
);
|
|
|
|
|
|
|
|
const nonMatchSymbols = buildString({
|
|
|
|
loneCodePoints: [],
|
|
|
|
ranges: [
|
|
|
|
[0x00DC00, 0x00DFFF],
|
|
|
|
[0x000000, 0x003005],
|
|
|
|
[0x003008, 0x003020],
|
|
|
|
[0x00302A, 0x003037],
|
|
|
|
[0x00303B, 0x0033FF],
|
2020-03-11 21:53:16 +01:00
|
|
|
[0x004DC0, 0x004DFF],
|
|
|
|
[0x009FFD, 0x00DBFF],
|
2017-04-13 17:22:49 +02:00
|
|
|
[0x00E000, 0x00F8FF],
|
|
|
|
[0x00FA6E, 0x00FA6F],
|
2020-03-11 21:53:16 +01:00
|
|
|
[0x00FADA, 0x016FE3],
|
|
|
|
[0x016FE5, 0x016FFF],
|
2019-03-12 09:47:27 +01:00
|
|
|
[0x0187F8, 0x0187FF],
|
2020-03-11 21:53:16 +01:00
|
|
|
[0x018CD6, 0x018CFF],
|
|
|
|
[0x018D09, 0x01B16F],
|
2017-07-05 09:43:09 +02:00
|
|
|
[0x01B2FC, 0x01FFFF],
|
2020-03-11 21:53:16 +01:00
|
|
|
[0x02A6DE, 0x02A6FF],
|
2017-04-13 17:22:49 +02:00
|
|
|
[0x02B735, 0x02B73F],
|
|
|
|
[0x02B81E, 0x02B81F],
|
2017-07-05 09:43:09 +02:00
|
|
|
[0x02CEA2, 0x02CEAF],
|
|
|
|
[0x02EBE1, 0x02F7FF],
|
2020-03-11 21:53:16 +01:00
|
|
|
[0x02FA1E, 0x02FFFF],
|
|
|
|
[0x03134B, 0x10FFFF]
|
2017-04-13 17:22:49 +02:00
|
|
|
]
|
|
|
|
});
|
|
|
|
testPropertyEscapes(
|
|
|
|
/^\P{Ideographic}+$/u,
|
|
|
|
nonMatchSymbols,
|
|
|
|
"\\P{Ideographic}"
|
|
|
|
);
|
|
|
|
testPropertyEscapes(
|
|
|
|
/^\P{Ideo}+$/u,
|
|
|
|
nonMatchSymbols,
|
|
|
|
"\\P{Ideo}"
|
|
|
|
);
|