Variation_Selector.js (1242B)
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 `Variation_Selector` 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 0x00180F 19 ], 20 ranges: [ 21 [0x00180B, 0x00180D], 22 [0x00FE00, 0x00FE0F], 23 [0x0E0100, 0x0E01EF] 24 ] 25 }); 26 testPropertyEscapes( 27 /^\p{Variation_Selector}+$/u, 28 matchSymbols, 29 "\\p{Variation_Selector}" 30 ); 31 testPropertyEscapes( 32 /^\p{VS}+$/u, 33 matchSymbols, 34 "\\p{VS}" 35 ); 36 37 const nonMatchSymbols = buildString({ 38 loneCodePoints: [ 39 0x00180E 40 ], 41 ranges: [ 42 [0x00DC00, 0x00DFFF], 43 [0x000000, 0x00180A], 44 [0x001810, 0x00DBFF], 45 [0x00E000, 0x00FDFF], 46 [0x00FE10, 0x0E00FF], 47 [0x0E01F0, 0x10FFFF] 48 ] 49 }); 50 testPropertyEscapes( 51 /^\P{Variation_Selector}+$/u, 52 nonMatchSymbols, 53 "\\P{Variation_Selector}" 54 ); 55 testPropertyEscapes( 56 /^\P{VS}+$/u, 57 nonMatchSymbols, 58 "\\P{VS}" 59 ); 60 61 reportCompare(0, 0);