X-Git-Url: http://git.asbjorn.it/?a=blobdiff_plain;f=test%2Funit%2Fcore.js;h=b6dc2064f2b38e4075f3627da3cba5ee9e440b0c;hb=18a6fbbb6ab0bdabbbd377d23385650e45c30e74;hp=c58f13f35e9660d0f087260c46eb0f74f35552d3;hpb=8c18dcdeb08b8e2b908c17efd760ff25635f3749;p=jquery.git diff --git a/test/unit/core.js b/test/unit/core.js index c58f13f..b6dc206 100644 --- a/test/unit/core.js +++ b/test/unit/core.js @@ -303,7 +303,7 @@ test("isXMLDoc - XML", function() { } test("jQuery('html')", function() { - expect(8); + expect(13); reset(); jQuery.foo = false; @@ -313,6 +313,14 @@ test("jQuery('html')", function() { jQuery("body").append(""); ok( jQuery.foo, "Executing a scripts contents in the right context" ); + // Test multi-line HTML + var div = jQuery("
\r\nsome text\n

some p

\nmore text\r\n
")[0]; + equals( div.nodeName.toUpperCase(), "DIV", "Make sure we're getting a div." ); + equals( div.firstChild.nodeType, 3, "Text node." ); + equals( div.lastChild.nodeType, 3, "Text node." ); + equals( div.childNodes[1].nodeType, 1, "Paragraph." ); + equals( div.childNodes[1].firstChild.nodeType, 3, "Paragraph text." ); + reset(); ok( jQuery("")[0], "Creating a link" );