Bug 1892041 - Part 2: Update test262. r=spidermonkey-reviewers,dminor
[gecko.git] / js / src / tests / test262 / built-ins / RegExp / S15.10.2.7_A3_T1.js
blob072d081318208eb8d061950c312e67106958c6a9
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: |
6     The production QuantifierPrefix :: + evaluates by returning the two
7     results 1 and \infty
8 es5id: 15.10.2.7_A3_T1
9 description: Execute /\s+java\s+/.exec("language  java\n") and check results
10 ---*/
12 var __executed = /\s+java\s+/.exec("language  java\n");
14 var __expected = ["  java\n"];
15 __expected.index = 8;
16 __expected.input = "language  java\n";
18 assert.sameValue(
19   __executed.length,
20   __expected.length,
21   'The value of __executed.length is expected to equal the value of __expected.length'
24 assert.sameValue(
25   __executed.index,
26   __expected.index,
27   'The value of __executed.index is expected to equal the value of __expected.index'
30 assert.sameValue(
31   __executed.input,
32   __expected.input,
33   'The value of __executed.input is expected to equal the value of __expected.input'
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   );
44 reportCompare(0, 0);