@@ -237,7 +237,7 @@ test("child and adjacent", function() {
237
237
} ) ;
238
238
239
239
test ( "attributes" , function ( ) {
240
- expect ( 35 ) ;
240
+ expect ( 39 ) ;
241
241
t ( "Attribute Exists" , "a[title]" , [ "google" ] ) ;
242
242
t ( "Attribute Exists" , "*[title]" , [ "google" ] ) ;
243
243
t ( "Attribute Exists" , "[title]" , [ "google" ] ) ;
@@ -275,8 +275,16 @@ test("attributes", function() {
275
275
t ( "Attribute Contains" , "a[href *= 'google']" , [ "google" , "groups" ] ) ;
276
276
t ( "Attribute Is Not Equal" , "#ap a[hreflang!='en']" , [ "google" , "groups" , "anchor1" ] ) ;
277
277
278
- var opt = document . getElementById ( "option1a" ) ;
279
- ok ( ( window . Sizzle || window . jQuery . find ) . matchesSelector ( opt , "[id*=option1][type!=checkbox]" ) , "Attribute Is Not Equal Matches" ) ;
278
+ var opt = document . getElementById ( "option1a" ) ,
279
+ match = ( window . Sizzle || window . jQuery . find ) . matchesSelector ;
280
+
281
+ opt . setAttribute ( "test" , "" ) ;
282
+
283
+ ok ( match ( opt , "[id*=option1][type!=checkbox]" ) , "Attribute Is Not Equal Matches" ) ;
284
+ ok ( match ( opt , "[id*=option1]" ) , "Attribute With No Quotes Contains Matches" ) ;
285
+ ok ( match ( opt , "[test=]" ) , "Attribute With No Quotes No Content Matches" ) ;
286
+ ok ( match ( opt , "[id=option1a]" ) , "Attribute With No Quotes Equals Matches" ) ;
287
+ ok ( match ( document . getElementById ( "simon1" ) , "a[href*=#]" ) , "Attribute With No Quotes Href Contains Matches" ) ;
280
288
281
289
t ( "Empty values" , "#select1 option[value='']" , [ "option1a" ] ) ;
282
290
t ( "Empty values" , "#select1 option[value!='']" , [ "option1b" , "option1c" , "option1d" ] ) ;
0 commit comments