Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/language/literals/regexp/S7.8.5_A1.5_T4.js

raw
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-RegularExpressionBackslashSequence
6 info: |
7 RegularExpressionBackslashSequence ::
8 \ RegularExpressionNonTerminator
9
10 RegularExpressionNonTerminator ::
11 SourceCharacter but not LineTerminator
12
13 description: >
14 A RegularExpressionBackslashSequence may not contain a <CR>, evaluated
15 ---*/
16
17 //CHECK#1
18 try {
19 eval("/\\\u000D/").source;
20 $ERROR('#1.1: RegularExpressionFirstChar :: BackslashSequence :: \\Carriage Return is incorrect. Actual: ' + (eval("/\\\u000D/").source));
21 }
22 catch (e) {
23 if ((e instanceof SyntaxError) !== true) {
24 $ERROR('#1.2: RegularExpressionFirstChar :: BackslashSequence :: \\Carriage Return is incorrect. Actual: ' + (e));
25 }
26 }