S7.8.5_A2.3_T5.js (1009B)
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-RegularExpressionNonTerminator 6 info: | 7 RegularExpressionBody :: 8 RegularExpressionFirstChar RegularExpressionChars 9 10 RegularExpressionChars :: 11 [empty] 12 RegularExpressionChars RegularExpressionChar 13 14 RegularExpressionFirstChar :: 15 RegularExpressionNonTerminator but not one of * or \ or / or [ 16 17 RegularExpressionNonTerminator :: 18 SourceCharacter but not LineTerminator 19 20 description: > 21 A regular expression may not contain a <LS> as a SourceCharacter, evaluated 22 23 ---*/ 24 25 //CHECK#1 26 try { 27 eval("/a\u2028/").source; 28 throw new Test262Error('#1.1: RegularExpressionChar :: Line separator is incorrect. Actual: ' + (eval("/a\u2028/").source)); 29 } 30 catch (e) { 31 if ((e instanceof SyntaxError) !== true) { 32 throw new Test262Error('#1.2: RegularExpressionChar :: Line separator is incorrect. Actual: ' + (e)); 33 } 34 } 35 36 reportCompare(0, 0);