blob: 8eacd910c9e27133281c6f85cde7a7574e4d98b4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
// Copyright (c) 2012 Ecma International. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: prod-RegularExpressionBackslashSequence
info: |
RegularExpressionBackslashSequence ::
\ RegularExpressionNonTerminator
RegularExpressionNonTerminator ::
SourceCharacter but not LineTerminator
SyntaxError exception is thrown if the RegularExpressionNonTerminator position of a
RegularExpressionBackslashSequence is a LineTerminator.
description: >
A RegularExpressionBackslashSequence may not contain a LineTerminator.
---*/
assert.throws(SyntaxError, function() {
eval("/\\\rn/;");
/*
The result of this string is:
"/\
n/;"
*/
});
reportCompare(0, 0);
|