X-Git-Url: http://git.asbjorn.it/?a=blobdiff_plain;ds=sidebyside;f=src%2Fjquery%2FcoreTest.js;h=6efaa84347f581c0b015f03f078cac41938e37c8;hb=609dec9a78ac98e69b67a73989d8437f67c6d33a;hp=58616dba116e44eb5a2770f8e1adc8a8409c3f3b;hpb=ea283bd13130303271077a6ee8b14b7c79bd0ce4;p=jquery.git diff --git a/src/jquery/coreTest.js b/src/jquery/coreTest.js index 58616db..6efaa84 100644 --- a/src/jquery/coreTest.js +++ b/src/jquery/coreTest.js @@ -398,6 +398,16 @@ test("parent[s]([String])", function() { ok( $("#groups").parents("div")[0].id == "main", "Filtered parents check2" ); }); +test("next/prev([String])", function() { + ok( $("#ap").next()[0].id == "foo", "Simple next check" ); + ok( $("#ap").next("div")[0].id == "foo", "Filtered next check" ); + ok( $("#ap").next("p").length == 0, "Filtered next check, no match" ); + + ok( $("#foo").prev()[0].id == "ap", "Simple prev check" ); + ok( $("#foo").prev("p")[0].id == "ap", "Filtered prev check" ); + ok( $("#foo").prev("div").length == 0, "Filtered prev check, no match" ); +}); + test("show()", function() { expect(1); var pass = true, div = $("div");