Fixed a bug with certain + selectors failing (Fixes jQuery bug #4023). Also tweaked...
[jquery.git] / test / unit / selector.js
index 419116e..f4b5b68 100644 (file)
@@ -69,7 +69,7 @@ test("broken", function() {
 });
 
 test("id", function() {
-       expect(27);
+       expect(28);
        t( "ID Selector", "#body", ["body"] );
        t( "ID Selector w/ Element", "body#body", ["body"] );
        t( "ID Selector w/ Element", "ul#first", [] );
@@ -105,6 +105,8 @@ test("id", function() {
 
        t( "Underscore ID", "#types_all", ["types_all"] );
        t( "Dash ID", "#fx-queue", ["fx-queue"] );
+
+       t( "ID with weird characters in it", "#name\\+value", ["name+value"] );
 });
 
 test("class", function() {
@@ -178,7 +180,7 @@ test("multiple", function() {
 });
 
 test("child and adjacent", function() {
-       expect(45);
+       expect(48);
        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"] );
@@ -191,6 +193,9 @@ test("child and adjacent", function() {
        t( "Adjacent", "a+ a", ["groups"] );
        t( "Adjacent", "a+a", ["groups"] );
        t( "Adjacent", "p + p", ["ap","en","sap"] );
+       t( "Adjacent", "p#firstp + p", ["ap"] );
+       t( "Adjacent", "p[lang=en] + p", ["sap"] );
+       t( "Adjacent", "a.GROUPS + code + a", ["mark"] );
        t( "Comma, Child, and Adjacent", "a + a, code > a", ["groups","anchor1","anchor2"] );
 
        t( "Verify deep class selector", "div.blah > p > a", [] );