S7.8.5_A2.3_T2.js (933B)
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 <LF> as a SourceCharacter, evaluated 25 ---*/ 26 27 //CHECK#1 28 try { 29 eval("/a\u000A/").source; 30 throw new Test262Error('#1.1: RegularExpressionChar :: Line Feedis incorrect. Actual: ' + (eval("/a\u000A/").source)); 31 } 32 catch (e) { 33 if ((e instanceof SyntaxError) !== true) { 34 throw new Test262Error('#1.2: RegularExpressionChar :: Line Feed is incorrect. Actual: ' + (e)); 35 } 36 } 37 38 reportCompare(0, 0);