S15.10.2.7_A2_T3.js (1251B)
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 i) The production QuantifierPrefix :: { DecimalDigits } evaluates... 7 ii) The production QuantifierPrefix :: ? evaluates by returning the two results 0 and 1 8 es5id: 15.10.2.7_A2_T3 9 description: Execute /b{2}c/.exec("aaabbbbcccddeeeefffff") and check results 10 ---*/ 11 12 var __executed = /b{2}c/.exec("aaabbbbcccddeeeefffff"); 13 14 var __expected = ["bbc"]; 15 __expected.index = 5; 16 __expected.input = "aaabbbbcccddeeeefffff"; 17 18 assert.sameValue( 19 __executed.length, 20 __expected.length, 21 'The value of __executed.length is expected to equal the value of __expected.length' 22 ); 23 24 assert.sameValue( 25 __executed.index, 26 __expected.index, 27 'The value of __executed.index is expected to equal the value of __expected.index' 28 ); 29 30 assert.sameValue( 31 __executed.input, 32 __expected.input, 33 'The value of __executed.input is expected to equal the value of __expected.input' 34 ); 35 36 for(var index=0; index<__expected.length; index++) { 37 assert.sameValue( 38 __executed[index], 39 __expected[index], 40 'The value of __executed[index] is expected to equal the value of __expected[index]' 41 ); 42 } 43 44 reportCompare(0, 0);