@@ -237,7 +237,7 @@ test("child and adjacent", function() {
237237} ) ;
238238
239239test ( "attributes" , function ( ) {
240- expect ( 35 ) ;
240+ expect ( 39 ) ;
241241 t ( "Attribute Exists" , "a[title]" , [ "google" ] ) ;
242242 t ( "Attribute Exists" , "*[title]" , [ "google" ] ) ;
243243 t ( "Attribute Exists" , "[title]" , [ "google" ] ) ;
@@ -275,8 +275,16 @@ test("attributes", function() {
275275 t ( "Attribute Contains" , "a[href *= 'google']" , [ "google" , "groups" ] ) ;
276276 t ( "Attribute Is Not Equal" , "#ap a[hreflang!='en']" , [ "google" , "groups" , "anchor1" ] ) ;
277277
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" ) ;
280288
281289 t ( "Empty values" , "#select1 option[value='']" , [ "option1a" ] ) ;
282290 t ( "Empty values" , "#select1 option[value!='']" , [ "option1b" , "option1c" , "option1d" ] ) ;
0 commit comments