Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(109)

Unified Diff: test/mjsunit/regress/regress-crbug-515897.js

Issue 2137033002: [regexp] Fix regexp source escaping with preceding backslashes. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix tests Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/mjsunit/regress/regress-3229.js ('k') | test/webkit/fast/regex/toString-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/regress/regress-crbug-515897.js
diff --git a/test/intl/regexp-prepare.js b/test/mjsunit/regress/regress-crbug-515897.js
similarity index 50%
copy from test/intl/regexp-prepare.js
copy to test/mjsunit/regress/regress-crbug-515897.js
index dec84110ed02e30bba674538534a069f7d43d39d..45a812c781ab13e37529e538c0ccac6fa65f11ff 100644
--- a/test/intl/regexp-prepare.js
+++ b/test/mjsunit/regress/regress-crbug-515897.js
@@ -2,4 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-/(\w)(\w)(\w)(\w)(\w)(\w)(\w)(\w)(\w)(\w)/.exec(">>>abcdefghij<<<");
+var r1 = new RegExp("\\\\/");
+assertTrue(r1.test("\\/"));
+var r2 = eval("/" + r1.source + "/");
+assertEquals("\\\\\\/", r1.source);
+assertEquals("\\\\\\/", r2.source);
« no previous file with comments | « test/mjsunit/regress/regress-3229.js ('k') | test/webkit/fast/regex/toString-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698