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("")', '[""]'); |