X-Git-Url: http://git.asbjorn.it/?a=blobdiff_plain;f=test%2Funit%2Fcore.js;h=6b2c3fe33f43eb1107f75bbd8ca7f46c3c2888ab;hb=24e036c7c88e7e3a1f878292e4b59914e1f4575c;hp=ea687c8f8fad5b90a66048e494b64091188bf3cc;hpb=90b25efa6c3c3676c5ae1dd782d04726e03a31e8;p=jquery.git diff --git a/test/unit/core.js b/test/unit/core.js index ea687c8..6b2c3fe 100644 --- a/test/unit/core.js +++ b/test/unit/core.js @@ -1058,7 +1058,7 @@ test("filter()", function() { }); test("not()", function() { - expect(7); + expect(8); ok( $("#main > p#ap > a").not("#google").length == 2, "not('selector')" ); ok( $("#main > p#ap > a").not(document.getElementById("google")).length == 2, "not(DOMElement)" ); isSet( $("p").not(".result").get(), q("firstp", "ap", "sndp", "en", "sap", "first"), "not('.class')" ); @@ -1066,6 +1066,9 @@ test("not()", function() { isSet( $("p").not($("#ap, #sndp, .result")).get(), q("firstp", "en", "sap", "first"), "not(jQuery)" ); ok( $("p").not(document.getElementsByTagName("p")).length == 0, "not(Array-like DOM collection)" ); isSet( $("#form option").not("option.emptyopt:contains('Nothing'),[selected],[value='1']").get(), q("option1c", "option1d", "option2c", "option3d" ), "not('complex selector')"); + + var selects = $("#form select"); + isSet( selects.not( selects[1] ), q("select1", "select3"), "filter out DOM element"); }); test("andSelf()", function() {