| 1 |
// Copyright (c) 2012 Ecma International. 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 |
SyntaxError exception is thrown if the RegularExpressionNonTerminator position of a |
| 14 |
RegularExpressionBackslashSequence is a LineTerminator. |
| 15 |
description: > |
| 16 |
A RegularExpressionBackslashSequence may not contain a LineTerminator. |
| 17 |
---*/ |
| 18 |
|
| 19 |
assert.throws(SyntaxError, function() { |
| 20 |
eval("/\\\rn/;"); |
| 21 |
/* |
| 22 |
|
| 23 |
The result of this string is: |
| 24 |
|
| 25 |
"/\ |
| 26 |
n/;" |
| 27 |
|
| 28 |
*/ |
| 29 |
}); |