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

Unified Diff: test/webkit/fast/regex/repeat-match-waldemar.js

Issue 20280003: Migrate more tests from blink repository. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 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
Index: test/webkit/fast/regex/repeat-match-waldemar.js
diff --git a/test/webkit/closure-inside-extra-arg-call.js b/test/webkit/fast/regex/repeat-match-waldemar.js
similarity index 57%
copy from test/webkit/closure-inside-extra-arg-call.js
copy to test/webkit/fast/regex/repeat-match-waldemar.js
index 15e7aeb203240c6bf972908485293102468dfb62..85cb20b0de605d095dceee6fe5d7c262016c7aa3 100644
--- a/test/webkit/closure-inside-extra-arg-call.js
+++ b/test/webkit/fast/regex/repeat-match-waldemar.js
@@ -22,58 +22,33 @@
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
description(
-
-"This test checks that activation objects for functions called with too many arguments are created properly."
-
+"Some test cases identified by Waldemar Horwat in response to this bug: https://bugs.webkit.org/show_bug.cgi?id=48101"
);
+shouldBe('/(?:a*?){2,}/.exec("aa")', '["aa"]');
+shouldBe('/(?:a*?){2,}/.exec("a")', '["a"]');
+shouldBe('/(?:a*?){2,}/.exec("")', '[""]');
-var c1;
-
-function f1()
-{
- var a = "x";
- var b = "y";
- var c = a + b;
- var d = a + b + c;
-
- c1 = function() { return d; }
-}
-
-f1(0, 0, 0, 0, 0, 0, 0, 0, 0);
-
-function s1() {
- shouldBe("c1()", '"xyxy"');
-}
-
-function t1() {
- var a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p;
- s1();
-}
-
-t1();
-
-var c2;
-
-function f2()
-{
- var a = "x";
- var b = "y";
- var c = a + b;
- var d = a + b + c;
+shouldBe('/(?:a*?)/.exec("aa")', '[""]');
+shouldBe('/(?:a*?)/.exec("a")', '[""]');
+shouldBe('/(?:a*?)/.exec("")', '[""]');
- c2 = function() { return d; }
-}
+shouldBe('/(?:a*?)(?:a*?)(?:a*?)/.exec("aa")', '[""]');
+shouldBe('/(?:a*?)(?:a*?)(?:a*?)/.exec("a")', '[""]');
+shouldBe('/(?:a*?)(?:a*?)(?:a*?)/.exec("")', '[""]');
-new f2(0, 0, 0, 0, 0, 0, 0, 0, 0);
+shouldBe('/(?:a*?){2}/.exec("aa")', '[""]');
+shouldBe('/(?:a*?){2}/.exec("a")', '[""]');
+shouldBe('/(?:a*?){2}/.exec("")', '[""]');
-function s2() {
- shouldBe("c2()", '"xyxy"');
-}
+shouldBe('/(?:a*?){2,3}/.exec("aa")', '["a"]');
+shouldBe('/(?:a*?){2,3}/.exec("a")', '["a"]');
+shouldBe('/(?:a*?){2,3}/.exec("")', '[""]');
-function t2() {
- var a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p;
- s2();
-}
+shouldBe('/(?:a*?)?/.exec("aa")', '["a"]');
+shouldBe('/(?:a*?)?/.exec("a")', '["a"]');
+shouldBe('/(?:a*?)?/.exec("")', '[""]');
-t2();
+shouldBe('/(?:a*?)*/.exec("aa")', '["aa"]');
+shouldBe('/(?:a*?)*/.exec("a")', '["a"]');
+shouldBe('/(?:a*?)*/.exec("")', '[""]');
« no previous file with comments | « test/webkit/fast/regex/quantified-assertions-expected.txt ('k') | test/webkit/fast/regex/repeat-match-waldemar-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698