2010-08-25 Michael Saboff <msaboff@apple.com>
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 26 Aug 2010 03:09:44 +0000 (03:09 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 26 Aug 2010 03:09:44 +0000 (03:09 +0000)
        Reviewed by Oliver Hunt.

        Added new test to check for regression as reported in
        https://bugs.webkit.org/show_bug.cgi?id=44600.

        * fast/js/script-tests/string-split-double-empty.js: Added.
        * fast/js/string-split-double-empty-expected.txt: Added.
        * fast/js/string-split-double-empty.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@66075 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/fast/js/script-tests/string-split-double-empty.js [new file with mode: 0644]
LayoutTests/fast/js/string-split-double-empty-expected.txt [new file with mode: 0644]
LayoutTests/fast/js/string-split-double-empty.html [new file with mode: 0644]

index a3131d822d1840009a053337474c21cd091a6d21..808561b20746b772bdc17371b4dee15bbad03a7e 100644 (file)
@@ -1,3 +1,14 @@
+2010-08-25  Michael Saboff  <msaboff@apple.com>
+
+        Reviewed by Oliver Hunt.
+
+        Added new test to check for regression as reported in
+        https://bugs.webkit.org/show_bug.cgi?id=44600.
+
+        * fast/js/script-tests/string-split-double-empty.js: Added.
+        * fast/js/string-split-double-empty-expected.txt: Added.
+        * fast/js/string-split-double-empty.html: Added.
+
 2010-08-25  Martin Robinson  <mrobinson@igalia.com>
 
         Skip a test that requires editing delegate dumps.
diff --git a/LayoutTests/fast/js/script-tests/string-split-double-empty.js b/LayoutTests/fast/js/script-tests/string-split-double-empty.js
new file mode 100644 (file)
index 0000000..3c53bcb
--- /dev/null
@@ -0,0 +1,8 @@
+description(
+'This test checks for a regression against <a href="https://bugs.webkit.org/show_bug.cgi?id=44600">split() function returns wrong answer for second empty split</a>.'
+);
+
+shouldBe('"".split(/s+/)', '[""]');
+shouldBe('"".split(/s+/)', '[""]');
+
+var successfullyParsed = true;
diff --git a/LayoutTests/fast/js/string-split-double-empty-expected.txt b/LayoutTests/fast/js/string-split-double-empty-expected.txt
new file mode 100644 (file)
index 0000000..9fee266
--- /dev/null
@@ -0,0 +1,11 @@
+This test checks for a regression against split() function returns wrong answer for second empty split.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS "".split(/s+/) is [""]
+PASS "".split(/s+/) is [""]
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/fast/js/string-split-double-empty.html b/LayoutTests/fast/js/string-split-double-empty.html
new file mode 100644 (file)
index 0000000..f35580f
--- /dev/null
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<link rel="stylesheet" href="resources/js-test-style.css">
+<script src="resources/js-test-pre.js"></script>
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+<script src="script-tests/string-split-double-empty.js"></script>
+<script src="resources/js-test-post.js"></script>
+</body>
+</html>