Added test for #891
authorJörn Zaefferer <joern.zaefferer@gmail.com>
Wed, 31 Jan 2007 21:25:58 +0000 (21:25 +0000)
committerJörn Zaefferer <joern.zaefferer@gmail.com>
Wed, 31 Jan 2007 21:25:58 +0000 (21:25 +0000)
src/selector/selectorTest.js

index 03e72f2..4d25c60 100644 (file)
@@ -127,7 +127,7 @@ test("expressions - pseudo (:) selctors", function() {
 });\r
 \r
 test("expressions - basic xpath", function() {\r
-       expect(14);\r
+       expect(15);\r
        ok( jQuery.find("//*").length >= 30, "All Elements (//*)" );\r
        t( "All Div Elements", "//div", ["main","foo"] );\r
        t( "Absolute Path", "/html/body", ["body"] );\r
@@ -142,4 +142,8 @@ test("expressions - basic xpath", function() {
        t( "Sibling Axis", "//p/../", ["firstp","ap","foo","first","firstUL","empty","form","floatTest","sndp","en","sap"] );\r
        t( "Sibling Axis", "//p/../*", ["firstp","ap","foo","first","firstUL","empty","form","floatTest","sndp","en","sap"] );\r
        t( "Has Children", "//p[a]", ["firstp","ap","en","sap"] );\r
+       \r
+       $("#foo").each(function() {\r
+               isSet( $("/p", this).get(), q("sndp", "en", "sap"), "Check XPath context" );\r
+       });\r
 });
\ No newline at end of file