Fix for bug #962.
[jquery.git] / src / jquery / coreTest.js
index 25cb69b..c20d406 100644 (file)
@@ -213,7 +213,7 @@ test("wrap(String|Element)", function() {
 });\r
 \r
 test("append(String|Element|Array<Element>|jQuery)", function() {\r
-       expect(10);\r
+       expect(11);\r
        var defaultText = 'Try them out:'\r
        var result = $('#first').append('<b>buga</b>');\r
        ok( result.text() == defaultText + 'buga', 'Check if text appending works' );\r
@@ -239,6 +239,10 @@ test("append(String|Element|Array&lt;Element&gt;|jQuery)", function() {
        ok( $("#sap")[0].innerHTML.match( /5$/ ), "Check for appending a number" );\r
 \r
        reset();\r
+       $("#sap").append( " text with spaces " );\r
+       ok( $("#sap")[0].innerHTML.match(/ text with spaces $/), "Check for appending text with spaces" );\r
+\r
+       reset();\r
        ok( $("#sap").append([]), "Check for appending an empty array." );\r
        ok( $("#sap").append(""), "Check for appending an empty string." );\r
        ok( $("#sap").append(document.getElementsByTagName("foo")), "Check for appending an empty nodelist." );\r
@@ -698,4 +702,4 @@ test("click() context", function() {
            //console.log( close[0]); // it's the <a> and not a <span> element\r
            return false;\r
        }).click();\r
-});
\ No newline at end of file
+});\r