| Index: test/mjsunit/regexp-global.js
|
| diff --git a/test/mjsunit/regexp-global.js b/test/mjsunit/regexp-global.js
|
| index fac5c6af03fd11dfcb3a4527d948c0e56b47315d..fd61390e0d7ee9956e8abadf5b6028b5b61bfac4 100644
|
| --- a/test/mjsunit/regexp-global.js
|
| +++ b/test/mjsunit/regexp-global.js
|
| @@ -125,3 +125,12 @@ str = str.replace(/(FOUR|TWO) \u817f (GOOD|BAD)/g,
|
| return match.length - 7;
|
| });
|
| assertEquals("4, 2!", str);
|
| +
|
| +// Test zero-length matches that have non-zero-length sub-captures that do not
|
| +// start at the match start position.
|
| +str = "up up up up";
|
| +str = str.replace(/\b(?=u(p))/g, function(match, capture) {
|
| + return capture.length;
|
| + });
|
| +
|
| +assertEquals("1up 1up 1up 1up", str);
|
|
|