X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=test%2Funit%2Fcore.js;h=ac65dccddeaaba35159d6313ee76431d980a4e05;hb=c59bf424a1aff179ad8b5cf51c157cd5f7f8a491;hp=1f0850c02468485b8bd770ab53696b023c308613;hpb=4afa60835146e71c0e57b492a1cca278eaf1ef9c;p=jquery.git diff --git a/test/unit/core.js b/test/unit/core.js index 1f0850c..ac65dcc 100644 --- a/test/unit/core.js +++ b/test/unit/core.js @@ -1345,7 +1345,7 @@ test("closest()", function() { }); test("not()", function() { - expect(8); + expect(11); equals( jQuery("#main > p#ap > a").not("#google").length, 2, "not('selector')" ); equals( jQuery("#main > p#ap > a").not(document.getElementById("google")).length, 2, "not(DOMElement)" ); isSet( jQuery("p").not(".result").get(), q("firstp", "ap", "sndp", "en", "sap", "first"), "not('.class')" ); @@ -1356,6 +1356,10 @@ test("not()", function() { var selects = jQuery("#form select"); isSet( selects.not( selects[1] ), q("select1", "select3"), "filter out DOM element"); + + isSet( jQuery('#ap *').not('code'), q("google", "groups", "anchor1", "mark"), "not('tag selector')" ); + isSet( jQuery('#ap *').not('code, #mark'), q("google", "groups", "anchor1"), "not('tag, ID selector')" ); + isSet( jQuery('#ap *').not('#mark, code'), q("google", "groups", "anchor1"), "not('ID, tag selector')"); }); test("andSelf()", function() { @@ -1516,7 +1520,7 @@ test("removeAttr(String", function() { test("text(String)", function() { expect(4); - equals( jQuery("#foo").text("
Hello cruel world!
")[0].innerHTML, "<div><b>Hello</b> cruel world!</div>", "Check escaped text" ); + equals( jQuery("#foo").text("
Hello cruel world!
")[0].innerHTML.replace(/>/g, ">"), "<div><b>Hello</b> cruel world!</div>", "Check escaped text" ); // using contents will get comments regular, text, and comment nodes var j = jQuery("#nonnodes").contents();