X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=test%2Funit%2Fselector.js;h=abb071748a73508b62ad4dd3b644cbb30fc19946;hb=4fc86d5eb1d4eaa3efad77dc224271d254f491e4;hp=04f99d6283ea85dc0bb80b16ee1e1ac807b174b4;hpb=8b129ccd49365582c4013fd391f6f83cc75a5d0a;p=jquery.git diff --git a/test/unit/selector.js b/test/unit/selector.js index 04f99d6..abb0717 100644 --- a/test/unit/selector.js +++ b/test/unit/selector.js @@ -153,7 +153,7 @@ test("class", function() { }); test("name", function() { - expect(14); + expect(15); t( "Name selector", "input[name=action]", ["text1"] ); t( "Name selector with single quotes", "input[name='action']", ["text1"] ); @@ -168,6 +168,12 @@ test("name", function() { same( jQuery("#form").find("input[name=action]").get(), q("text1"), "Name selector within the context of another element" ); same( jQuery("#form").find("input[name='foo[bar]']").get(), q("hidden2"), "Name selector for grouped form element within the context of another element" ); + var form = jQuery("
").appendTo("body"); + + equals( form.find("input").length, 1, "Make sure that rooted queries on forms (with possible expandos) work." ); + + form.remove(); + var a = jQuery('
tName1 AtName2 A
tName1 Div
').appendTo('#main').children(); equals( a.length, 3, "Make sure the right number of elements were inserted." );