Index: test/mjsunit/regexp-global.js |
diff --git a/test/mjsunit/regexp-global.js b/test/mjsunit/regexp-global.js |
index fac5c6af03fd11dfcb3a4527d948c0e56b47315d..12f857859648cdab2c7f9be94f9e1344f2c3e466 100644 |
--- a/test/mjsunit/regexp-global.js |
+++ b/test/mjsunit/regexp-global.js |
@@ -125,3 +125,8 @@ str = str.replace(/(FOUR|TWO) \u817f (GOOD|BAD)/g, |
return match.length - 7; |
}); |
assertEquals("4, 2!", str); |
+ |
+// Test capture that is a real substring. |
+var str = "Beasts of England, beasts of Ireland"; |
+str = str.replace(/(.*)/g, function(match) { return '~'; }); |
+assertEquals("~~", str); |