Index: test/mjsunit/regexp-compile.js |
diff --git a/test/mjsunit/regexp-compile.js b/test/mjsunit/regexp-compile.js |
index 92c3f7b3dd62e5c69f38f9fbe0c071b96c1ec693..f00178008ccaede68a6a62b6edf4dcf5ee16b4cb 100644 |
--- a/test/mjsunit/regexp-compile.js |
+++ b/test/mjsunit/regexp-compile.js |
@@ -42,3 +42,7 @@ re.compile("(y)"); |
assertEquals(["y", "y"], re.exec("axyb")); |
assertEquals(2, re.compile.length); |
+ |
+// If RegExp parsing fails, the RegExp is not modified |
+var r = /./; try { r.compile('? invalid'); } catch(err){} |
+assertEquals("/./", r.toString()); |