tor-browser

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

Script_-_Mongolian.js (1710B)


      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=Mongolian`
      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    0x001804
     19  ],
     20  ranges: [
     21    [0x001800, 0x001801],
     22    [0x001806, 0x001819],
     23    [0x001820, 0x001878],
     24    [0x001880, 0x0018AA],
     25    [0x011660, 0x01166C]
     26  ]
     27 });
     28 testPropertyEscapes(
     29  /^\p{Script=Mongolian}+$/u,
     30  matchSymbols,
     31  "\\p{Script=Mongolian}"
     32 );
     33 testPropertyEscapes(
     34  /^\p{Script=Mong}+$/u,
     35  matchSymbols,
     36  "\\p{Script=Mong}"
     37 );
     38 testPropertyEscapes(
     39  /^\p{sc=Mongolian}+$/u,
     40  matchSymbols,
     41  "\\p{sc=Mongolian}"
     42 );
     43 testPropertyEscapes(
     44  /^\p{sc=Mong}+$/u,
     45  matchSymbols,
     46  "\\p{sc=Mong}"
     47 );
     48 
     49 const nonMatchSymbols = buildString({
     50  loneCodePoints: [
     51    0x001805
     52  ],
     53  ranges: [
     54    [0x00DC00, 0x00DFFF],
     55    [0x000000, 0x0017FF],
     56    [0x001802, 0x001803],
     57    [0x00181A, 0x00181F],
     58    [0x001879, 0x00187F],
     59    [0x0018AB, 0x00DBFF],
     60    [0x00E000, 0x01165F],
     61    [0x01166D, 0x10FFFF]
     62  ]
     63 });
     64 testPropertyEscapes(
     65  /^\P{Script=Mongolian}+$/u,
     66  nonMatchSymbols,
     67  "\\P{Script=Mongolian}"
     68 );
     69 testPropertyEscapes(
     70  /^\P{Script=Mong}+$/u,
     71  nonMatchSymbols,
     72  "\\P{Script=Mong}"
     73 );
     74 testPropertyEscapes(
     75  /^\P{sc=Mongolian}+$/u,
     76  nonMatchSymbols,
     77  "\\P{sc=Mongolian}"
     78 );
     79 testPropertyEscapes(
     80  /^\P{sc=Mong}+$/u,
     81  nonMatchSymbols,
     82  "\\P{sc=Mong}"
     83 );
     84 
     85 reportCompare(0, 0);