| 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 |
The first character of a regular expression may not be a <LS>, (\u2028), evaluated |
| 22 |
---*/ |
| 23 |
|
| 24 |
//CHECK#1 |
| 25 |
try { |
| 26 |
eval("/\u2029/").source; |
| 27 |
$ERROR('#1.1: RegularExpressionFirstChar :: Paragraph separator is incorrect. Actual: ' + (eval("/\u2029/").source)); |
| 28 |
} |
| 29 |
catch (e) { |
| 30 |
if ((e instanceof SyntaxError) !== true) { |
| 31 |
$ERROR('#1.2: RegularExpressionFirstChar :: Paragraph separator is incorrect. Actual: ' + (e)); |
| 32 |
} |
| 33 |
} |