Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/built-ins/RegExp/S15.10.2.8_A4_T8.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 info: |
6 The production Atom :: . evaluates as follows:
7 i) Let A be the set of all characters except the four line terminator characters <LF>, <CR>, <LS>, or <PS>
8 ii) Call CharacterSetMatcher(A, false) and return its Matcher result
9 es5id: 15.10.2.8_A4_T8
10 description: Execute /.+/.exec("`1234567890-=~!@#$%^&*()_+") and check results
11 ---*/
12
13 var __string = "`1234567890-=~!@#$%^&*()_+";
14 var __executed = /.+/.exec(__string);
15
16 var __expected = ["`1234567890-=~!@#$%^&*()_+"];
17 __expected.index = 0;
18 __expected.input = __string;
19
20 //CHECK#1
21 if (__executed.length !== __expected.length) {
22 $ERROR('#1: __string = "`1234567890-=~!@#$%^&*()_+"; __executed = /.+/.exec(__string); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);
23 }
24
25 //CHECK#2
26 if (__executed.index !== __expected.index) {
27 $ERROR('#2: __string = "`1234567890-=~!@#$%^&*()_+"; __executed = /.+/.exec(__string); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);
28 }
29
30 //CHECK#3
31 if (__executed.input !== __expected.input) {
32 $ERROR('#3: __string = "`1234567890-=~!@#$%^&*()_+"; __executed = /.+/.exec(__string); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);
33 }
34
35 //CHECK#4
36 for(var index=0; index<__expected.length; index++) {
37 if (__executed[index] !== __expected[index]) {
38 $ERROR('#4: __string = "`1234567890-=~!@#$%^&*()_+"; __executed = /.+/.exec(__string); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);
39 }
40 }