X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=test%2Funit%2Fcore.js;h=a4e82eb6e0ec2e3f695bc2eb07e2ea21af087fee;hb=f1f5cd9f6a80b0de18cc0402f28b440f48b95f83;hp=4d04af759a1509a61e1c499a50bb333e2758d11d;hpb=73ff49ac9a3a6d049557394062e3ad915bb04ef1;p=jquery.git diff --git a/test/unit/core.js b/test/unit/core.js index 4d04af7..a4e82eb 100644 --- a/test/unit/core.js +++ b/test/unit/core.js @@ -53,7 +53,7 @@ test("jQuery()", function() { }); test("selector state", function() { - expect(28); + expect(30); var test; @@ -72,6 +72,10 @@ test("selector state", function() { test = jQuery("#main"); equals( test.selector, "#main", "#main Selector" ); equals( test.context, document, "#main Context" ); + + test = jQuery("#notfoundnono"); + equals( test.selector, "#notfoundnono", "#notfoundnono Selector" ); + equals( test.context, document, "#notfoundnono Context" ); test = jQuery("#main", document); equals( test.selector, "#main", "#main Selector" ); @@ -383,7 +387,7 @@ test("index(Object)", function() { }); test("attr(String)", function() { - expect(26); + expect(27); equals( jQuery('#text1').attr('value'), "Test", 'Check for value attribute' ); equals( jQuery('#text1').attr('value', "Test2").attr('defaultValue'), "Test", 'Check for defaultValue attribute' ); equals( jQuery('#text1').attr('type'), "text", 'Check for type attribute' ); @@ -401,12 +405,14 @@ test("attr(String)", function() { equals( jQuery('#text1').attr('maxLength'), '30', 'Check for maxLength attribute' ); equals( jQuery('#area1').attr('maxLength'), '30', 'Check for maxLength attribute' ); equals( jQuery('#select2').attr('selectedIndex'), 3, 'Check for selectedIndex attribute' ); - equals( jQuery('#foo').attr('nodeName'), 'DIV', 'Check for nodeName attribute' ); - equals( jQuery('#foo').attr('tagName'), 'DIV', 'Check for tagName attribute' ); + equals( jQuery('#foo').attr('nodeName').toUpperCase(), 'DIV', 'Check for nodeName attribute' ); + equals( jQuery('#foo').attr('tagName').toUpperCase(), 'DIV', 'Check for tagName attribute' ); jQuery('').attr('href', '#5').appendTo('#main'); // using innerHTML in IE causes href attribute to be serialized to the full path equals( jQuery('#tAnchor5').attr('href'), "#5", 'Check for non-absolute href (an anchor)' ); + equals( jQuery("