X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=src%2Fselector%2FselectorTest.js;h=5b77b3b454f80773bd6c2254240e9b030ec0a075;hb=bdf05d890fe3a8cc085b2b4f13881ca043943e44;hp=0bf90e1d222f69641cdd2ed11a0bd8c17f8507d3;hpb=7c6100f5ed840b49e8e0de1f9eb90ea2ef1c47ef;p=jquery.git diff --git a/src/selector/selectorTest.js b/src/selector/selectorTest.js index 0bf90e1..5b77b3b 100644 --- a/src/selector/selectorTest.js +++ b/src/selector/selectorTest.js @@ -91,7 +91,7 @@ test("multiple", function() { }); test("child and adjacent", function() { - expect(18); + expect(19); t( "Child", "p > a", ["simon1","google","groups","mark","yahoo","simon"] ); t( "Child", "p> a", ["simon1","google","groups","mark","yahoo","simon"] ); t( "Child", "p >a", ["simon1","google","groups","mark","yahoo","simon"] ); @@ -110,6 +110,7 @@ test("child and adjacent", function() { t( "Nth Child", "p:nth-child(1)", ["firstp","sndp"] ); t( "Last Child", "p:last-child", ["sap"] ); + t( "Last Child", "a:last-child", ["simon1","anchor1","mark","yahoo","anchor2","simon"] ); t( "Nth-child", "#main form > *:nth-child(2)", ["text2","idTest"] ); t( "Nth-child", "#main form > :nth-child(2)", ["text2","idTest"] ); @@ -182,8 +183,9 @@ test("pseudo (:) selectors", function() { }); test("basic xpath", function() { - expect(15); + expect(16); ok( jQuery.find("//*").length >= 30, "All Elements (//*)" ); + ok( jQuery.find("//div", q("main")[0])[0] = q("foo")[0], "All Relative (#main//div)" ); t( "All Div Elements", "//div", ["main","foo"] ); t( "Absolute Path", "/html/body", ["body"] ); t( "Absolute Path w/ *", "/* /body", ["body"] );