Fixed the issue where getting an empty value was impossible. Fixes #5697.
[jquery.git] / test / unit / manipulation.js
index 03f8f32..7521c76 100644 (file)
@@ -619,7 +619,7 @@ test("clone() on XML nodes", function() {
 }
 
 test("val()", function() {
-       expect(9);
+       expect(11);
 
        document.getElementById('text1').value = "bla";
        equals( jQuery("#text1").val(), "bla", "Check for modified value of input element" );
@@ -641,6 +641,11 @@ test("val()", function() {
 
        equals( jQuery('#option3e').val(), 'no value', 'Call val() on a option element with no value attribute' );
 
+       equals( jQuery('#option3a').val(), '', 'Call val() on a option element with no value attribute' );
+
+       jQuery('#select3').val("");
+       same( jQuery('#select3').val(), [''], 'Call val() on a multiple="multiple" select' );
+
 });
 
 var testVal = function(valueObj) {