tor-browser

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

unicode_character_class_backspace_escape.js (489B)


      1 // Copyright (C) 2020 Alexey Shvayka. All rights reserved.
      2 // This code is governed by the BSD license found in the LICENSE file.
      3 
      4 /*---
      5 esid: prod-ClassEscapes
      6 description: >
      7  \b escape inside CharacterClass is valid in Unicode patterns (unlike \B).
      8 info: |
      9  ClassEscape[U] ::
     10    b
     11 
     12  Static Semantics: CharacterValue
     13 
     14  ClassEscape :: b
     15 
     16  1. Return the code point value of U+0008 (BACKSPACE).
     17 ---*/
     18 
     19 assert(/[\b]/u.test('\u0008'));
     20 assert(/[\b-A]/u.test('A'));
     21 
     22 reportCompare(0, 0);