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