X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=test%2Funit%2Fmanipulation.js;h=0f11de41c304f2882b7b8091b96393210b6d08c4;hb=7c4144fab314d98b85303d01ab904bb711bc2ecc;hp=00984168ca385de088031b221f029fc9128687fa;hpb=449e099b97d823ed0252d8821880bc0e471701ea;p=jquery.git diff --git a/test/unit/manipulation.js b/test/unit/manipulation.js index 0098416..0f11de4 100644 --- a/test/unit/manipulation.js +++ b/test/unit/manipulation.js @@ -643,7 +643,7 @@ test("val(Function)", function() { }) var testHtml = function(valueObj) { - expect(17); + expect(20); window.debug = true; @@ -676,6 +676,12 @@ var testHtml = function(valueObj) { equals( $div.html(valueObj( 5 )).html(), '5', 'Setting a number as html' ); equals( $div.html(valueObj( 0 )).html(), '0', 'Setting a zero as html' ); + var $div2 = jQuery('
'), insert = "<div>hello1</div>"; + equals( $div2.html(insert).html(), insert, "Verify escaped insertion." ); + equals( $div2.html("x" + insert).html(), "x" + insert, "Verify escaped insertion." ); + equals( $div2.html(" " + insert).html(), " " + insert, "Verify escaped insertion." ); + + reset(); jQuery("#main").html(valueObj('
'));