tor-browser

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

valid-flags-y.js (724B)


      1 // Copyright (C) 2015 the V8 project authors. All rights reserved.
      2 // This code is governed by the BSD license found in the LICENSE file.
      3 
      4 /*---
      5 es6id: 21.2.3.1
      6 description: The `y` flag is accepted by the RegExp constructor
      7 info: |
      8    [...]
      9    10. Return RegExpInitialize(O, P, F).
     10 
     11    21.2.3.2.2 Runtime Semantics: RegExpInitialize ( obj, pattern, flags )
     12 
     13    [...]
     14    7. If F contains any code unit other than "g", "i", "m", "u", or "y" or if
     15       it contains the same code unit more than once, throw a SyntaxError
     16       exception.
     17 ---*/
     18 
     19 new RegExp('abc', 'y');
     20 new RegExp('abc', 'gy');
     21 new RegExp('abc', 'iy');
     22 new RegExp('abc', 'my');
     23 new RegExp('abc', 'uy');
     24 new RegExp('abc', 'gimuy');
     25 
     26 reportCompare(0, 0);