X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;ds=sidebyside;f=test%2Funit%2Fselector.js;h=924f41d0e5186b8bd84bfd6f7ec65aa980a39f5f;hb=b16da9d762c5fc87c5a9afacd517af0036972a47;hp=4c63a7a195add70bcb25efb78c85f873ab2b3263;hpb=f38648c7cd3a37f4070b77b2c92151f68aa66fef;p=jquery.git diff --git a/test/unit/selector.js b/test/unit/selector.js index 4c63a7a..924f41d 100644 --- a/test/unit/selector.js +++ b/test/unit/selector.js @@ -215,7 +215,7 @@ test("child and adjacent", function() { }); test("attributes", function() { - expect(37); + expect(40); t( "Attribute Exists", "a[title]", ["google"] ); t( "Attribute Exists", "*[title]", ["google"] ); t( "Attribute Exists", "[title]", ["google"] ); @@ -233,6 +233,13 @@ test("attributes", function() { t( "for Attribute", "form label[for]", ["label-for"] ); t( "for Attribute in form", "#form [for=action]", ["label-for"] ); + + jQuery("form input")[0].test = 0; + jQuery("form input")[1].test = 1; + + t( "Expando attribute", "form input[test]", ["text1", "text2"] ); + t( "Expando attribute value", "form input[test=0]", ["text1"] ); + t( "Expando attribute value", "form input[test=1]", ["text2"] ); t( "Attribute containing []", "input[name^='foo[']", ["hidden2"] ); t( "Attribute containing []", "input[name^='foo[bar]']", ["hidden2"] );