S15.10.2.13_A3_T2.js (1129B)
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_T2 7 description: Execute /c[\b]{3}d/.exec("abc\b\b\bdef") and check results 8 ---*/ 9 10 var __executed = /c[\b]{3}d/.exec("abc\b\b\bdef"); 11 12 var __expected = ["c\b\b\bd"]; 13 __expected.index = 2; 14 __expected.input = "abc\b\b\bdef"; 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);