Implemented #753
[jquery.git] / src / jquery / coreTest.js
index 169380b..436dcc5 100644 (file)
@@ -67,9 +67,13 @@ test("attr(String)", function() {
        ok( $('#form').attr('action').indexOf("formaction") >= 0, 'Check for action attribute' );\r
 });\r
 \r
-test("attr(String, Function)", function() {\r
+test("attr(String, Function|String)", function() {\r
        ok( $('#text1').attr('value', function() { return this.id })[0].value == "text1", "Set value from id" );\r
        ok( $('#text2').attr('value', "${this.id}")[0].value == "text2", "Set value from id" );\r
+       reset();\r
+       $('#text1, #text2').attr({value: "${this.id + 'foobar'}"});\r
+       ok( $('#text1')[0].value == "text1foobar", "Set value from id" );\r
+       ok( $('#text2')[0].value == "text2foobar", "Set value from id" );\r
 });\r
 \r
 test("attr(Hash)", function() {\r