S7.8.5_A2.5_T4.js (927B)
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: prod-RegularExpressionBackslashSequence 6 info: | 7 RegularExpressionBackslashSequence :: 8 \ RegularExpressionNonTerminator 9 10 RegularExpressionNonTerminator :: 11 SourceCharacter but not LineTerminator 12 13 LineTerminator :: 14 <LF> 15 <CR> 16 <LS> 17 <PS> 18 19 description: > 20 A regular expression may not contain a <LF> as a SourceCharacter, evaluated 21 ---*/ 22 23 //CHECK#1 24 try { 25 eval("/a\\\u000D/").source; 26 throw new Test262Error('#1.1: RegularExpressionChar :: BackslashSequence :: \\Carriage Return is incorrect. Actual: ' + (eval("/a\\\u000D/").source)); 27 } 28 catch (e) { 29 if ((e instanceof SyntaxError) !== true) { 30 throw new Test262Error('#1.2: RegularExpressionChar :: BackslashSequence :: \\Carriage Return is incorrect. Actual: ' + (e)); 31 } 32 } 33 34 reportCompare(0, 0);