tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

Script_-_Cypriot.js (1656B)


      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=Cypriot`
      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    0x010808,
     19    0x01083C,
     20    0x01083F
     21  ],
     22  ranges: [
     23    [0x010800, 0x010805],
     24    [0x01080A, 0x010835],
     25    [0x010837, 0x010838]
     26  ]
     27 });
     28 testPropertyEscapes(
     29  /^\p{Script=Cypriot}+$/u,
     30  matchSymbols,
     31  "\\p{Script=Cypriot}"
     32 );
     33 testPropertyEscapes(
     34  /^\p{Script=Cprt}+$/u,
     35  matchSymbols,
     36  "\\p{Script=Cprt}"
     37 );
     38 testPropertyEscapes(
     39  /^\p{sc=Cypriot}+$/u,
     40  matchSymbols,
     41  "\\p{sc=Cypriot}"
     42 );
     43 testPropertyEscapes(
     44  /^\p{sc=Cprt}+$/u,
     45  matchSymbols,
     46  "\\p{sc=Cprt}"
     47 );
     48 
     49 const nonMatchSymbols = buildString({
     50  loneCodePoints: [
     51    0x010809,
     52    0x010836
     53  ],
     54  ranges: [
     55    [0x00DC00, 0x00DFFF],
     56    [0x000000, 0x00DBFF],
     57    [0x00E000, 0x0107FF],
     58    [0x010806, 0x010807],
     59    [0x010839, 0x01083B],
     60    [0x01083D, 0x01083E],
     61    [0x010840, 0x10FFFF]
     62  ]
     63 });
     64 testPropertyEscapes(
     65  /^\P{Script=Cypriot}+$/u,
     66  nonMatchSymbols,
     67  "\\P{Script=Cypriot}"
     68 );
     69 testPropertyEscapes(
     70  /^\P{Script=Cprt}+$/u,
     71  nonMatchSymbols,
     72  "\\P{Script=Cprt}"
     73 );
     74 testPropertyEscapes(
     75  /^\P{sc=Cypriot}+$/u,
     76  nonMatchSymbols,
     77  "\\P{sc=Cypriot}"
     78 );
     79 testPropertyEscapes(
     80  /^\P{sc=Cprt}+$/u,
     81  nonMatchSymbols,
     82  "\\P{sc=Cprt}"
     83 );
     84 
     85 reportCompare(0, 0);