X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;ds=sidebyside;f=src%2Fselector%2FselectorTest.js;h=c9cf762a57f848d9bc4c0e24295e45e925c12bf4;hb=44599e174b5d1f924def5a3950375ead12b9d21b;hp=be216f8bf827eca8917d841170150f1efa6e6faa;hpb=4259b02c99202092d222fc7ca19c1ab83df7eafa;p=jquery.git diff --git a/src/selector/selectorTest.js b/src/selector/selectorTest.js index be216f8..c9cf762 100644 --- a/src/selector/selectorTest.js +++ b/src/selector/selectorTest.js @@ -11,7 +11,7 @@ test("expressions - element", function() { }); test("expressions - id", function() { - expect(11); + expect(13); t( "ID Selector", "#body", ["body"] ); t( "ID Selector w/ Element", "body#body", ["body"] ); t( "ID Selector w/ Element", "ul#first", [] ); @@ -25,7 +25,11 @@ test("expressions - id", function() { t( "All Children of ID", "#foo/*", ["sndp", "en", "sap"] ); t( "All Children of ID with no children", "#firstUL/*", [] ); - t( "ID selector with non-existant ancestor", "#asdfasdf #foobar", [] ); + $('tName1 AtName2 A
tName1 Div
').appendTo('#main'); + ok( $("#tName1")[0].id == 'tName1', "ID selector with same value for a name attribute" ); + ok( $("#tName2").length == 0, "ID selector non-existing but name attribute on an A tag" ); + + t( "ID selector with non-existant ancestor", "#asdfasdf #foobar", [] ); // bug #986 });