Index: test/mjsunit/regexp-global.js |
diff --git a/test/mjsunit/regexp-global.js b/test/mjsunit/regexp-global.js |
index 1652774bc22d28a613fb03ef90906fd3eb89fa66..093dba17c10ff348a1c0dd83cd1fb4c4d738eed7 100644 |
--- a/test/mjsunit/regexp-global.js |
+++ b/test/mjsunit/regexp-global.js |
@@ -239,4 +239,16 @@ for (var m = 0; m < 200; m++) { |
// Test 3a: String.match. |
test_match(test_3_expectation, subject, /a1/g); |
-} |
+} |
+ |
+ |
+// Test String hashing (compiling regular expression includes hashing). |
+var crosscheck = "\x80"; |
+for (var i = 0; i < 12; i++) crosscheck += crosscheck; |
+new RegExp(crosscheck); |
+ |
+var subject = "ascii~only~string~here~"; |
+var replacement = "\x80"; |
+var result = subject.replace(/~/g, replacement); |
+for (var i = 0; i < 5; i++) result += result; |
+new RegExp(result); |