+# defaults
+
+my $defform = HTML::Form::Simple->new({foo => '<">', '' => 'empty', 0 => 0});
+ok($defform, 'form with defaults');
+
+is(
+ $defform->hidden(''),
+ '<input name="" type="hidden" value="empty">',
+ 'hidden with default'
+);
+
+is(
+ $defform->hidden(undef),
+ '<input type="hidden">',
+ 'nameless hidden'
+);
+
+is(
+ $defform->text('foo'),
+ '<input id="foo" name="foo" type="text" value="<">">',
+ 'input with default'
+);
+
+is(
+ $defform->text('foo', {value => 'custom'}),
+ '<input id="foo" name="foo" type="text" value="custom">',
+ 'input with value and default'
+);
+
+is_deeply(
+ [ $defform->radio(0 => [1, 0]) ],
+ [
+ '<input id="0_1" name="0" type="radio" value="1">',
+ '<input checked id="0_0" name="0" type="radio" value="0">',
+ ],
+ 'select with default'
+);
+