tor-browser

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

invalid-lone-surrogate-groupname.js (575B)


      1 // Copyright 2017 the V8 project authors. All rights reserved.
      2 // This code is governed by the BSD license found in the LICENSE file.
      3 
      4 /*---
      5 description: Lone surrogates in RegExp group names
      6 esid: prod-GroupSpecifier
      7 features: [regexp-named-groups]
      8 ---*/
      9 
     10 assert.throws(SyntaxError, () => eval("/(?<a\uD801>.)/"), "Lead");
     11 assert.throws(SyntaxError, () => eval("/(?<a\uDCA4>.)/"), "Trail");
     12 assert.throws(SyntaxError, () => eval("/(?<a\uD801>.)/u"), "Lead with u flag");
     13 assert.throws(SyntaxError, () => eval("/(?<a\uDCA4>.)/u"), "Trail with u flag");
     14 
     15 reportCompare(0, 0);