diff --git a/modules/simpletest/tests/form.test b/modules/simpletest/tests/form.test
index 0bf6c8c..a543234 100644
--- a/modules/simpletest/tests/form.test
+++ b/modules/simpletest/tests/form.test
@@ -2099,3 +2099,41 @@ class HTMLIdTestCase extends DrupalWebTestCase {
     $this->assertNoDuplicateIds('There are no duplicate IDs');
   }
 }
+
+/**
+ * Tests for form textarea.
+ */
+class FormTextareaTestCase extends DrupalUnitTestCase {
+
+  /**
+   * Pairs of input and expected result.
+   */
+  var $data = array(
+    array(NULL, FALSE),
+    array(NULL, NULL),
+    array('', array('test')),
+    array('test', 'test'),
+    array('123', 123),
+  );
+
+  public static function getInfo() {
+    return array(
+      'name' => 'Form textarea',
+      'description' => 'Tests form textarea related functions.',
+      'group' => 'Form API',
+    );
+  }
+
+  /**
+   * Tests that textarea value is properly set.
+   */
+  public function testValueCallback() {
+    $element = array();
+    $form_state = array();
+    foreach ($this->data as $expected_and_input) {
+      $expected = $expected_and_input[0];
+      $input = $expected_and_input[1];
+      $this->assertIdentical($expected, form_type_textarea_value($element, $input, $form_state));
+    }
+  }
+}
