|
1 /* |
|
2 * Any copyright is dedicated to the Public Domain. |
|
3 * http://creativecommons.org/licenses/publicdomain/ |
|
4 */ |
|
5 |
|
6 var BUGNUMBER = 501739; |
|
7 var summary = |
|
8 "String.prototype.match behavior with zero-length matches involving " + |
|
9 "forward lookahead"; |
|
10 |
|
11 print(BUGNUMBER + ": " + summary); |
|
12 |
|
13 /************** |
|
14 * BEGIN TEST * |
|
15 **************/ |
|
16 |
|
17 var r = /(?=x)/g; |
|
18 |
|
19 var res = "aaaaaaaaaxaaaaaaaaax".match(r); |
|
20 assertEq(res.length, 2); |
|
21 |
|
22 /******************************************************************************/ |
|
23 |
|
24 if (typeof reportCompare === "function") |
|
25 reportCompare(true, true); |
|
26 |
|
27 print("Tests complete"); |