Debian Codegraph @

js/src/tests/test262/built-ins/RegExp/property-escapes/generated/White_Space.js

raw
1 // Copyright 2024 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 `White_Space`
8 info: |
9 Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests
10 Unicode v16.0.0
11 esid: sec-static-semantics-unicodematchproperty-p
12 features: [regexp-unicode-property-escapes]
13 includes: [regExpUtils.js]
14 ---*/
15
16 const matchSymbols = buildString({
17 loneCodePoints: [
18 0x000020,
19 0x000085,
20 0x0000A0,
21 0x001680,
22 0x00202F,
23 0x00205F,
24 0x003000
25 ],
26 ranges: [
27 [0x000009, 0x00000D],
28 [0x002000, 0x00200A],
29 [0x002028, 0x002029]
30 ]
31 });
32 testPropertyEscapes(
33 /^\p{White_Space}+$/u,
34 matchSymbols,
35 "\\p{White_Space}"
36 );
37 testPropertyEscapes(
38 /^\p{space}+$/u,
39 matchSymbols,
40 "\\p{space}"
41 );
42
43 const nonMatchSymbols = buildString({
44 loneCodePoints: [],
45 ranges: [
46 [0x00DC00, 0x00DFFF],
47 [0x000000, 0x000008],
48 [0x00000E, 0x00001F],
49 [0x000021, 0x000084],
50 [0x000086, 0x00009F],
51 [0x0000A1, 0x00167F],
52 [0x001681, 0x001FFF],
53 [0x00200B, 0x002027],
54 [0x00202A, 0x00202E],
55 [0x002030, 0x00205E],
56 [0x002060, 0x002FFF],
57 [0x003001, 0x00DBFF],
58 [0x00E000, 0x10FFFF]
59 ]
60 });
61 testPropertyEscapes(
62 /^\P{White_Space}+$/u,
63 nonMatchSymbols,
64 "\\P{White_Space}"
65 );
66 testPropertyEscapes(
67 /^\P{space}+$/u,
68 nonMatchSymbols,
69 "\\P{space}"
70 );
71
72 reportCompare(0, 0);