Bug 1892041 - Part 2: Update test262. r=spidermonkey-reviewers,dminor
[gecko.git] / js / src / tests / test262 / built-ins / RegExp / S15.10.2.13_A3_T1.js
blobf7410bc10bc00b721a2143845386a141982f9a32
1 // Copyright 2009 the Sputnik authors.  All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
4 /*---
5 info: Inside a CharacterClass, \b means the backspace character
6 es5id: 15.10.2.13_A3_T1
7 description: Execute /.[\b]./.exec("abc\bdef") and check results
8 ---*/
10 var __executed = /.[\b]./.exec("abc\bdef");
12 var __expected = ["c\bd"];
13 __expected.index = 2;
14 __expected.input = "abc\bdef";
16 assert.sameValue(
17   __executed.length,
18   __expected.length,
19   'The value of __executed.length is expected to equal the value of __expected.length'
22 assert.sameValue(
23   __executed.index,
24   __expected.index,
25   'The value of __executed.index is expected to equal the value of __expected.index'
28 assert.sameValue(
29   __executed.input,
30   __expected.input,
31   'The value of __executed.input is expected to equal the value of __expected.input'
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   );
42 reportCompare(0, 0);