Script_-_Greek.js (2946B)
1 // Copyright 2025 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 `Script=Greek` 8 info: | 9 Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests 10 Unicode v17.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 0x00037F, 19 0x000384, 20 0x000386, 21 0x00038C, 22 0x001DBF, 23 0x001F59, 24 0x001F5B, 25 0x001F5D, 26 0x002126, 27 0x00AB65, 28 0x0101A0 29 ], 30 ranges: [ 31 [0x000370, 0x000373], 32 [0x000375, 0x000377], 33 [0x00037A, 0x00037D], 34 [0x000388, 0x00038A], 35 [0x00038E, 0x0003A1], 36 [0x0003A3, 0x0003E1], 37 [0x0003F0, 0x0003FF], 38 [0x001D26, 0x001D2A], 39 [0x001D5D, 0x001D61], 40 [0x001D66, 0x001D6A], 41 [0x001F00, 0x001F15], 42 [0x001F18, 0x001F1D], 43 [0x001F20, 0x001F45], 44 [0x001F48, 0x001F4D], 45 [0x001F50, 0x001F57], 46 [0x001F5F, 0x001F7D], 47 [0x001F80, 0x001FB4], 48 [0x001FB6, 0x001FC4], 49 [0x001FC6, 0x001FD3], 50 [0x001FD6, 0x001FDB], 51 [0x001FDD, 0x001FEF], 52 [0x001FF2, 0x001FF4], 53 [0x001FF6, 0x001FFE], 54 [0x010140, 0x01018E], 55 [0x01D200, 0x01D245] 56 ] 57 }); 58 testPropertyEscapes( 59 /^\p{Script=Greek}+$/u, 60 matchSymbols, 61 "\\p{Script=Greek}" 62 ); 63 testPropertyEscapes( 64 /^\p{Script=Grek}+$/u, 65 matchSymbols, 66 "\\p{Script=Grek}" 67 ); 68 testPropertyEscapes( 69 /^\p{sc=Greek}+$/u, 70 matchSymbols, 71 "\\p{sc=Greek}" 72 ); 73 testPropertyEscapes( 74 /^\p{sc=Grek}+$/u, 75 matchSymbols, 76 "\\p{sc=Grek}" 77 ); 78 79 const nonMatchSymbols = buildString({ 80 loneCodePoints: [ 81 0x000374, 82 0x00037E, 83 0x000385, 84 0x000387, 85 0x00038B, 86 0x00038D, 87 0x0003A2, 88 0x001F58, 89 0x001F5A, 90 0x001F5C, 91 0x001F5E, 92 0x001FB5, 93 0x001FC5, 94 0x001FDC, 95 0x001FF5 96 ], 97 ranges: [ 98 [0x00DC00, 0x00DFFF], 99 [0x000000, 0x00036F], 100 [0x000378, 0x000379], 101 [0x000380, 0x000383], 102 [0x0003E2, 0x0003EF], 103 [0x000400, 0x001D25], 104 [0x001D2B, 0x001D5C], 105 [0x001D62, 0x001D65], 106 [0x001D6B, 0x001DBE], 107 [0x001DC0, 0x001EFF], 108 [0x001F16, 0x001F17], 109 [0x001F1E, 0x001F1F], 110 [0x001F46, 0x001F47], 111 [0x001F4E, 0x001F4F], 112 [0x001F7E, 0x001F7F], 113 [0x001FD4, 0x001FD5], 114 [0x001FF0, 0x001FF1], 115 [0x001FFF, 0x002125], 116 [0x002127, 0x00AB64], 117 [0x00AB66, 0x00DBFF], 118 [0x00E000, 0x01013F], 119 [0x01018F, 0x01019F], 120 [0x0101A1, 0x01D1FF], 121 [0x01D246, 0x10FFFF] 122 ] 123 }); 124 testPropertyEscapes( 125 /^\P{Script=Greek}+$/u, 126 nonMatchSymbols, 127 "\\P{Script=Greek}" 128 ); 129 testPropertyEscapes( 130 /^\P{Script=Grek}+$/u, 131 nonMatchSymbols, 132 "\\P{Script=Grek}" 133 ); 134 testPropertyEscapes( 135 /^\P{sc=Greek}+$/u, 136 nonMatchSymbols, 137 "\\P{sc=Greek}" 138 ); 139 testPropertyEscapes( 140 /^\P{sc=Grek}+$/u, 141 nonMatchSymbols, 142 "\\P{sc=Grek}" 143 ); 144 145 reportCompare(0, 0);