tor-browser

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

Script_-_Arabic.js (3695B)


      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=Arabic`
      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    0x01EE24,
     19    0x01EE27,
     20    0x01EE39,
     21    0x01EE3B,
     22    0x01EE42,
     23    0x01EE47,
     24    0x01EE49,
     25    0x01EE4B,
     26    0x01EE54,
     27    0x01EE57,
     28    0x01EE59,
     29    0x01EE5B,
     30    0x01EE5D,
     31    0x01EE5F,
     32    0x01EE64,
     33    0x01EE7E
     34  ],
     35  ranges: [
     36    [0x000600, 0x000604],
     37    [0x000606, 0x00060B],
     38    [0x00060D, 0x00061A],
     39    [0x00061C, 0x00061E],
     40    [0x000620, 0x00063F],
     41    [0x000641, 0x00064A],
     42    [0x000656, 0x00066F],
     43    [0x000671, 0x0006DC],
     44    [0x0006DE, 0x0006FF],
     45    [0x000750, 0x00077F],
     46    [0x000870, 0x000891],
     47    [0x000897, 0x0008E1],
     48    [0x0008E3, 0x0008FF],
     49    [0x00FB50, 0x00FD3D],
     50    [0x00FD40, 0x00FDCF],
     51    [0x00FDF0, 0x00FDFF],
     52    [0x00FE70, 0x00FE74],
     53    [0x00FE76, 0x00FEFC],
     54    [0x010E60, 0x010E7E],
     55    [0x010EC2, 0x010EC7],
     56    [0x010ED0, 0x010ED8],
     57    [0x010EFA, 0x010EFF],
     58    [0x01EE00, 0x01EE03],
     59    [0x01EE05, 0x01EE1F],
     60    [0x01EE21, 0x01EE22],
     61    [0x01EE29, 0x01EE32],
     62    [0x01EE34, 0x01EE37],
     63    [0x01EE4D, 0x01EE4F],
     64    [0x01EE51, 0x01EE52],
     65    [0x01EE61, 0x01EE62],
     66    [0x01EE67, 0x01EE6A],
     67    [0x01EE6C, 0x01EE72],
     68    [0x01EE74, 0x01EE77],
     69    [0x01EE79, 0x01EE7C],
     70    [0x01EE80, 0x01EE89],
     71    [0x01EE8B, 0x01EE9B],
     72    [0x01EEA1, 0x01EEA3],
     73    [0x01EEA5, 0x01EEA9],
     74    [0x01EEAB, 0x01EEBB],
     75    [0x01EEF0, 0x01EEF1]
     76  ]
     77 });
     78 testPropertyEscapes(
     79  /^\p{Script=Arabic}+$/u,
     80  matchSymbols,
     81  "\\p{Script=Arabic}"
     82 );
     83 testPropertyEscapes(
     84  /^\p{Script=Arab}+$/u,
     85  matchSymbols,
     86  "\\p{Script=Arab}"
     87 );
     88 testPropertyEscapes(
     89  /^\p{sc=Arabic}+$/u,
     90  matchSymbols,
     91  "\\p{sc=Arabic}"
     92 );
     93 testPropertyEscapes(
     94  /^\p{sc=Arab}+$/u,
     95  matchSymbols,
     96  "\\p{sc=Arab}"
     97 );
     98 
     99 const nonMatchSymbols = buildString({
    100  loneCodePoints: [
    101    0x000605,
    102    0x00060C,
    103    0x00061B,
    104    0x00061F,
    105    0x000640,
    106    0x000670,
    107    0x0006DD,
    108    0x0008E2,
    109    0x00FE75,
    110    0x01EE04,
    111    0x01EE20,
    112    0x01EE23,
    113    0x01EE28,
    114    0x01EE33,
    115    0x01EE38,
    116    0x01EE3A,
    117    0x01EE48,
    118    0x01EE4A,
    119    0x01EE4C,
    120    0x01EE50,
    121    0x01EE53,
    122    0x01EE58,
    123    0x01EE5A,
    124    0x01EE5C,
    125    0x01EE5E,
    126    0x01EE60,
    127    0x01EE63,
    128    0x01EE6B,
    129    0x01EE73,
    130    0x01EE78,
    131    0x01EE7D,
    132    0x01EE7F,
    133    0x01EE8A,
    134    0x01EEA4,
    135    0x01EEAA
    136  ],
    137  ranges: [
    138    [0x00DC00, 0x00DFFF],
    139    [0x000000, 0x0005FF],
    140    [0x00064B, 0x000655],
    141    [0x000700, 0x00074F],
    142    [0x000780, 0x00086F],
    143    [0x000892, 0x000896],
    144    [0x000900, 0x00DBFF],
    145    [0x00E000, 0x00FB4F],
    146    [0x00FD3E, 0x00FD3F],
    147    [0x00FDD0, 0x00FDEF],
    148    [0x00FE00, 0x00FE6F],
    149    [0x00FEFD, 0x010E5F],
    150    [0x010E7F, 0x010EC1],
    151    [0x010EC8, 0x010ECF],
    152    [0x010ED9, 0x010EF9],
    153    [0x010F00, 0x01EDFF],
    154    [0x01EE25, 0x01EE26],
    155    [0x01EE3C, 0x01EE41],
    156    [0x01EE43, 0x01EE46],
    157    [0x01EE55, 0x01EE56],
    158    [0x01EE65, 0x01EE66],
    159    [0x01EE9C, 0x01EEA0],
    160    [0x01EEBC, 0x01EEEF],
    161    [0x01EEF2, 0x10FFFF]
    162  ]
    163 });
    164 testPropertyEscapes(
    165  /^\P{Script=Arabic}+$/u,
    166  nonMatchSymbols,
    167  "\\P{Script=Arabic}"
    168 );
    169 testPropertyEscapes(
    170  /^\P{Script=Arab}+$/u,
    171  nonMatchSymbols,
    172  "\\P{Script=Arab}"
    173 );
    174 testPropertyEscapes(
    175  /^\P{sc=Arabic}+$/u,
    176  nonMatchSymbols,
    177  "\\P{sc=Arabic}"
    178 );
    179 testPropertyEscapes(
    180  /^\P{sc=Arab}+$/u,
    181  nonMatchSymbols,
    182  "\\P{sc=Arab}"
    183 );
    184 
    185 reportCompare(0, 0);