Script_-_Kharoshthi.js (1809B)
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=Kharoshthi` 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 ranges: [ 19 [0x010A00, 0x010A03], 20 [0x010A05, 0x010A06], 21 [0x010A0C, 0x010A13], 22 [0x010A15, 0x010A17], 23 [0x010A19, 0x010A35], 24 [0x010A38, 0x010A3A], 25 [0x010A3F, 0x010A48], 26 [0x010A50, 0x010A58] 27 ] 28 }); 29 testPropertyEscapes( 30 /^\p{Script=Kharoshthi}+$/u, 31 matchSymbols, 32 "\\p{Script=Kharoshthi}" 33 ); 34 testPropertyEscapes( 35 /^\p{Script=Khar}+$/u, 36 matchSymbols, 37 "\\p{Script=Khar}" 38 ); 39 testPropertyEscapes( 40 /^\p{sc=Kharoshthi}+$/u, 41 matchSymbols, 42 "\\p{sc=Kharoshthi}" 43 ); 44 testPropertyEscapes( 45 /^\p{sc=Khar}+$/u, 46 matchSymbols, 47 "\\p{sc=Khar}" 48 ); 49 50 const nonMatchSymbols = buildString({ 51 loneCodePoints: [ 52 0x010A04, 53 0x010A14, 54 0x010A18 55 ], 56 ranges: [ 57 [0x00DC00, 0x00DFFF], 58 [0x000000, 0x00DBFF], 59 [0x00E000, 0x0109FF], 60 [0x010A07, 0x010A0B], 61 [0x010A36, 0x010A37], 62 [0x010A3B, 0x010A3E], 63 [0x010A49, 0x010A4F], 64 [0x010A59, 0x10FFFF] 65 ] 66 }); 67 testPropertyEscapes( 68 /^\P{Script=Kharoshthi}+$/u, 69 nonMatchSymbols, 70 "\\P{Script=Kharoshthi}" 71 ); 72 testPropertyEscapes( 73 /^\P{Script=Khar}+$/u, 74 nonMatchSymbols, 75 "\\P{Script=Khar}" 76 ); 77 testPropertyEscapes( 78 /^\P{sc=Kharoshthi}+$/u, 79 nonMatchSymbols, 80 "\\P{sc=Kharoshthi}" 81 ); 82 testPropertyEscapes( 83 /^\P{sc=Khar}+$/u, 84 nonMatchSymbols, 85 "\\P{sc=Khar}" 86 ); 87 88 reportCompare(0, 0);