tor-browser

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

Soft_Dotted.js (2563B)


      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 `Soft_Dotted`
      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    0x00012F,
     19    0x000249,
     20    0x000268,
     21    0x00029D,
     22    0x0002B2,
     23    0x0003F3,
     24    0x000456,
     25    0x000458,
     26    0x001D62,
     27    0x001D96,
     28    0x001DA4,
     29    0x001DA8,
     30    0x001E2D,
     31    0x001ECB,
     32    0x002071,
     33    0x002C7C,
     34    0x01DF1A,
     35    0x01E068
     36  ],
     37  ranges: [
     38    [0x000069, 0x00006A],
     39    [0x002148, 0x002149],
     40    [0x01D422, 0x01D423],
     41    [0x01D456, 0x01D457],
     42    [0x01D48A, 0x01D48B],
     43    [0x01D4BE, 0x01D4BF],
     44    [0x01D4F2, 0x01D4F3],
     45    [0x01D526, 0x01D527],
     46    [0x01D55A, 0x01D55B],
     47    [0x01D58E, 0x01D58F],
     48    [0x01D5C2, 0x01D5C3],
     49    [0x01D5F6, 0x01D5F7],
     50    [0x01D62A, 0x01D62B],
     51    [0x01D65E, 0x01D65F],
     52    [0x01D692, 0x01D693],
     53    [0x01E04C, 0x01E04D]
     54  ]
     55 });
     56 testPropertyEscapes(
     57  /^\p{Soft_Dotted}+$/u,
     58  matchSymbols,
     59  "\\p{Soft_Dotted}"
     60 );
     61 testPropertyEscapes(
     62  /^\p{SD}+$/u,
     63  matchSymbols,
     64  "\\p{SD}"
     65 );
     66 
     67 const nonMatchSymbols = buildString({
     68  loneCodePoints: [
     69    0x000457
     70  ],
     71  ranges: [
     72    [0x00DC00, 0x00DFFF],
     73    [0x000000, 0x000068],
     74    [0x00006B, 0x00012E],
     75    [0x000130, 0x000248],
     76    [0x00024A, 0x000267],
     77    [0x000269, 0x00029C],
     78    [0x00029E, 0x0002B1],
     79    [0x0002B3, 0x0003F2],
     80    [0x0003F4, 0x000455],
     81    [0x000459, 0x001D61],
     82    [0x001D63, 0x001D95],
     83    [0x001D97, 0x001DA3],
     84    [0x001DA5, 0x001DA7],
     85    [0x001DA9, 0x001E2C],
     86    [0x001E2E, 0x001ECA],
     87    [0x001ECC, 0x002070],
     88    [0x002072, 0x002147],
     89    [0x00214A, 0x002C7B],
     90    [0x002C7D, 0x00DBFF],
     91    [0x00E000, 0x01D421],
     92    [0x01D424, 0x01D455],
     93    [0x01D458, 0x01D489],
     94    [0x01D48C, 0x01D4BD],
     95    [0x01D4C0, 0x01D4F1],
     96    [0x01D4F4, 0x01D525],
     97    [0x01D528, 0x01D559],
     98    [0x01D55C, 0x01D58D],
     99    [0x01D590, 0x01D5C1],
    100    [0x01D5C4, 0x01D5F5],
    101    [0x01D5F8, 0x01D629],
    102    [0x01D62C, 0x01D65D],
    103    [0x01D660, 0x01D691],
    104    [0x01D694, 0x01DF19],
    105    [0x01DF1B, 0x01E04B],
    106    [0x01E04E, 0x01E067],
    107    [0x01E069, 0x10FFFF]
    108  ]
    109 });
    110 testPropertyEscapes(
    111  /^\P{Soft_Dotted}+$/u,
    112  nonMatchSymbols,
    113  "\\P{Soft_Dotted}"
    114 );
    115 testPropertyEscapes(
    116  /^\P{SD}+$/u,
    117  nonMatchSymbols,
    118  "\\P{SD}"
    119 );
    120 
    121 reportCompare(0, 0);