Debian Codegraph @

js/src/tests/test262/built-ins/RegExp/S15.10.2.13_A3_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 info: Inside a CharacterClass, \b means the backspace character
6 es5id: 15.10.2.13_A3_T4
7 description: Execute /[^\[\b\]]+/.exec("abcdef") and check results
8 ---*/
9
10 var __executed = /[^\[\b\]]+/.exec("abcdef");
11
12 var __expected = ["abcdef"];
13 __expected.index = 0;
14 __expected.input = "abcdef";
15
16 assert.sameValue(
17 __executed.length,
18 __expected.length,
19 'The value of __executed.length is expected to equal the value of __expected.length'
20 );
21
22 assert.sameValue(
23 __executed.index,
24 __expected.index,
25 'The value of __executed.index is expected to equal the value of __expected.index'
26 );
27
28 assert.sameValue(
29 __executed.input,
30 __expected.input,
31 'The value of __executed.input is expected to equal the value of __expected.input'
32 );
33
34 for(var index=0; index<__expected.length; index++) {
35 assert.sameValue(
36 __executed[index],
37 __expected[index],
38 'The value of __executed[index] is expected to equal the value of __expected[index]'
39 );
40 }
41
42 reportCompare(0, 0);