2018-06-07 15:32:41 +02:00
|
|
|
// Copyright 2018 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 `Any`
|
|
|
|
info: |
|
|
|
|
Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests
|
2018-06-07 15:32:41 +02:00
|
|
|
Unicode v11.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({
|
|
|
|
loneCodePoints: [],
|
|
|
|
ranges: [
|
|
|
|
[0x00DC00, 0x00DFFF],
|
|
|
|
[0x000000, 0x00DBFF],
|
|
|
|
[0x00E000, 0x10FFFF]
|
|
|
|
]
|
|
|
|
});
|
|
|
|
testPropertyEscapes(
|
|
|
|
/^\p{Any}+$/u,
|
|
|
|
matchSymbols,
|
|
|
|
"\\p{Any}"
|
|
|
|
);
|
|
|
|
|
2018-02-09 18:09:47 +01:00
|
|
|
assert(
|
|
|
|
!/\P{Any}/u.test(""),
|
2017-04-13 17:22:49 +02:00
|
|
|
"`\\P{Any}` should match nothing (not even the empty string)"
|
|
|
|
);
|