tor-browser

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

S7.8.5_A2.3_T4.js (944B)


      1 // Copyright 2009 the Sputnik authors.  All rights reserved.
      2 // This code is governed by the BSD license found in the LICENSE file.
      3 
      4 /*---
      5 esid: sec-literals-regular-expression-literals
      6 info: |
      7  RegularExpressionChar ::
      8    RegularExpressionBackslashSequence
      9 
     10 
     11  RegularExpressionBackslashSequence ::
     12    \ RegularExpressionNonTerminator
     13 
     14  RegularExpressionNonTerminator ::
     15    SourceCharacter but not LineTerminator
     16 
     17  LineTerminator ::
     18    <LF>
     19    <CR>
     20    <LS>
     21    <PS>
     22 
     23 description: >
     24  A regular expression may not contain a <CR> as a SourceCharacter, evaluated
     25 ---*/
     26 
     27 //CHECK#1
     28 try {
     29   eval("/a\u000D/").source;
     30   throw new Test262Error('#1.1: RegularExpressionChar :: Carriage Retur is incorrect. Actual: ' + (eval("/a\u000D/").source));
     31 }
     32 catch (e) {
     33  if ((e instanceof SyntaxError) !== true) {
     34     throw new Test262Error('#1.2: RegularExpressionChar :: Carriage Retur is incorrect. Actual: ' + (e));
     35  }
     36 }
     37 
     38 reportCompare(0, 0);