X-Git-Url: http://git.asbjorn.it/?a=blobdiff_plain;f=test%2Funit%2Fcore.js;h=dbf23e7d3f9f036870945dc81d3cae0b692bcd33;hb=a23e4361fc0221ca6132e962a5a8b2030bd1c390;hp=a0e7b1f846661204e78d66a774385ef0f31fa3b8;hpb=1e9593646f5047cfc5b1754b663e59ec9b73dfce;p=jquery.git diff --git a/test/unit/core.js b/test/unit/core.js index a0e7b1f..dbf23e7 100644 --- a/test/unit/core.js +++ b/test/unit/core.js @@ -1174,7 +1174,7 @@ test("val(String/Number)", function() { var scriptorder = 0; test("html(String)", function() { - expect(11); + expect(13); var div = jQuery("#main > div"); div.html("test"); var pass = true; @@ -1196,6 +1196,10 @@ test("html(String)", function() { jQuery("#main select").html(""); equals( jQuery("#main select").val(), "O2", "Selected option correct" ); + var $div = jQuery('
'); + equals( $div.html( 5 ).html(), '5', 'Setting a number as html' ); + equals( $div.html( 0 ).html(), '0', 'Setting a zero as html' ); + stop(); jQuery("#main").html(''); @@ -1571,13 +1575,15 @@ test("empty()", function() { }); test("slice()", function() { - expect(5); + expect(6); isSet( jQuery("#ap a").slice(1,2), q("groups"), "slice(1,2)" ); isSet( jQuery("#ap a").slice(1), q("groups", "anchor1", "mark"), "slice(1)" ); isSet( jQuery("#ap a").slice(0,3), q("google", "groups", "anchor1"), "slice(0,3)" ); isSet( jQuery("#ap a").slice(-1), q("mark"), "slice(-1)" ); isSet( jQuery("#ap a").eq(1), q("groups"), "eq(1)" ); + + isSet( jQuery("#ap a").eq('1'), q("groups"), "eq('1')" ); }); test("map()", function() {