Fixed typo
[jquery.git] / src / jquery / coreTest.js
index be39a87..7dd7a16 100644 (file)
@@ -331,11 +331,15 @@ test("expressions - element", function() {
 });\r
 \r
 test("expressions - id", function() {\r
-       expect(5);\r
+       expect(8);\r
        t( "ID Selector", "#body", ["body"] );\r
        t( "ID Selector w/ Element", "body#body", ["body"] );\r
        t( "ID Selector w/ Element", "ul#first", [] );\r
        \r
+       t( "ID Selector, child ID present", "#form > #radio1", ["radio1"] );  // bug #267\r
+       t( "ID Selector, not an ancestor ID", "#form  #first", [] );\r
+       t( "ID Selector, not a child ID", "#form > #option1a", [] );\r
+       \r
        t( "All Children of ID", "#foo/*", ["sndp", "en", "sap"]  );\r
        t( "All Children of ID with no children", "#firstUL/*", []  );\r
 });\r
@@ -375,7 +379,7 @@ test("expressions - child and adjacent", function() {
 });\r
 \r
 test("expressions - attributes", function() {\r
-       expect(16);\r
+       expect(19);\r
        t( "Attribute Exists", "a[@title]", ["google"] );\r
        t( "Attribute Exists", "*[@title]", ["google"] );\r
        t( "Attribute Exists", "[@title]", ["google"] );\r
@@ -391,6 +395,10 @@ test("expressions - attributes", function() {
        t( "Attribute Ends With", "a[@href $= 'org/']", ["mark"] );\r
        t( "Attribute Contains", "a[@href *= 'google']", ["google","groups"] );\r
        \r
+       t("Select options via [@selected]", "#select1 option[@selected]", ["option1a"] );\r
+       t("Select options via [@selected]", "#select2 option[@selected]", ["option2d"] );\r
+       t("Select options via [@selected]", "#select3 option[@selected]", ["option3b", "option3c"] );\r
+       \r
        t( "Grouped Form Elements", "input[@name='foo[bar]']", ["hidden2"] );\r
        \r
        t( ":not() Existing attribute", "select:not([@multiple])", ["select1", "select2"]);\r