mirror of https://github.com/tc39/test262.git
30 lines
709 B
JavaScript
30 lines
709 B
JavaScript
// 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/;"
|
|
|
|
*/
|
|
});
|