git.shiar.nl
/
perl
/
html-form-simple.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
XXX: test update: option name override should not reset id
[perl/html-form-simple.git]
/
t
/
html.t
diff --git
a/t/html.t
b/t/html.t
index 166ab111149cfd8bc160ad17571b7284084b4e4e..5b3fa2a13600b6a4d136c2ecc69f0c9af305fd95 100644
(file)
--- a/
t/html.t
+++ b/
t/html.t
@@
-5,7
+5,7
@@
use warnings;
use Test::More;
use Test::More;
-plan tests =>
68
;
+plan tests =>
72
;
use_ok('HTML::Form::Simple');
use_ok('HTML::Form::Simple');
@@
-346,6
+346,15
@@
is_deeply(
'multiple radio labels'
);
'multiple radio labels'
);
+is_deeply(
+ [ $form->radio(undef, [0, 1], undef, 0) ],
+ [
+ '<input checked type="radio" value="0">',
+ '<input type="radio" value="1">',
+ ],
+ 'radio default'
+);
+
is_deeply(
[ $form->radio(foo => ['foo', ''], 'test', {value => '', id => ''}) ],
[
is_deeply(
[ $form->radio(foo => ['foo', ''], 'test', {value => '', id => ''}) ],
[
@@
-463,7
+472,7
@@
is_deeply(
[ $form->check(foo => ['bar', {name => 'bar'}], {name => 'ignored'}) ],
[
'<label><input id="foo_1" name="foo" type="checkbox" value="1"> bar</label>',
[ $form->check(foo => ['bar', {name => 'bar'}], {name => 'ignored'}) ],
[
'<label><input id="foo_1" name="foo" type="checkbox" value="1"> bar</label>',
- '<input id="
bar
_2" name="bar" type="checkbox" value="2">',
+ '<input id="
foo
_2" name="bar" type="checkbox" value="2">',
],
'checkbox names'
);
],
'checkbox names'
);