]> source.dussan.org Git - jquery.git/commitdiff
Fixed bug #194, added regression tests
authorJörn Zaefferer <joern.zaefferer@gmail.com>
Sat, 16 Sep 2006 14:57:15 +0000 (14:57 +0000)
committerJörn Zaefferer <joern.zaefferer@gmail.com>
Sat, 16 Sep 2006 14:57:15 +0000 (14:57 +0000)
build/test/index.html
src/jquery/jquery.js

index 31bf43d329f9beac610a968aa27e24dae55bb006..9ee1d4e4e10d2b5384f6898e6fdfb33b124bc738 100644 (file)
@@ -39,7 +39,7 @@
 
                        <input type="radio" name="radio2" id="radio2" checked/>
                        <input type="checkbox" name="check" id="check1" checked/>
-                       <input type="checkbox" name="check" id="check2"/>
+                       <input type="checkbox" id="check2"/>
 
                        <input type="hidden" name="hidden" id="hidden1"/>
                        <input type="text" style="display:none;" name="foo[bar]" id="hidden2"/>\r
index 11cd56e6a6f5aa644afb46ce5f1d5ef502c950cc..69628b37f64c9001e158cdb967e13724ac04294e 100644 (file)
@@ -1522,9 +1522,9 @@ jQuery.extend({
                "@": {
                        "=": "z==m[4]",
                        "!=": "z!=m[4]",
-                       "^=": "!z.indexOf(m[4])",
-                       "$=": "z.substr(z.length - m[4].length,m[4].length)==m[4]",
-                       "*=": "z.indexOf(m[4])>=0",
+                       "^=": "z && !z.indexOf(m[4])",
+                       "$=": "z && z.substr(z.length - m[4].length,m[4].length)==m[4]",
+                       "*=": "z && z.indexOf(m[4])>=0",
                        "": "z"
                },
                "[": "jQuery.find(m[2],a).length"
@@ -1583,6 +1583,11 @@ jQuery.extend({
         * @test t( "Attribute Exists", "a[@title]", ["google"] );
         * @test t( "Attribute Exists", "*[@title]", ["google"] );
         * @test t( "Attribute Exists", "[@title]", ["google"] );
+        * 
+        * @test t( "Non-existing part of attribute [@name*=bla]", "[@name*=bla]", [] ); 
+        * @test t( "Non-existing start of attribute [@name^=bla]", "[@name^=bla]", [] ); 
+        * @test t( "Non-existing end of attribute [@name$=bla]", "[@name$=bla]", [] ); 
+        *
         * @test t( "Attribute Equals", "a[@rel='bookmark']", ["simon1"] );
         * @test t( "Attribute Equals", 'a[@rel="bookmark"]', ["simon1"] );
         * @test t( "Attribute Equals", "a[@rel=bookmark]", ["simon1"] );