Index: test/mjsunit/string-replace.js |
diff --git a/test/mjsunit/string-replace.js b/test/mjsunit/string-replace.js |
index d72f73bc46e81cb325308d6ddb57d4c7978113c7..ea6912724399bd37d99cd1d72ab1a33576f29616 100644 |
--- a/test/mjsunit/string-replace.js |
+++ b/test/mjsunit/string-replace.js |
@@ -180,3 +180,11 @@ longstring = longstring + longstring; |
replaceTest(longstring + longstring, |
"<" + longstring + ">", /<(.*)>/g, "$1$1"); |
+ |
+replaceTest("string 42", "string x", /x/g, function() { return 42; }); |
+replaceTest("string 42", "string x", /x/, function() { return 42; }); |
+replaceTest("string 42", "string x", /[xy]/g, function() { return 42; }); |
+replaceTest("string 42", "string x", /[xy]/, function() { return 42; }); |
+replaceTest("string true", "string x", /x/g, function() { return true; }); |
+replaceTest("string null", "string x", /x/g, function() { return null; }); |
+replaceTest("string undefined", "string x", /x/g, function() { return undefined; }); |