X-Git-Url: http://git.shiar.net/perl/html-form-simple.git/blobdiff_plain/d74d61d638a9f0c83f3860de02225c16309ccf2d..2ee16ffeffbdd0998c60f36a976169789e3c8e27:/t/html.t diff --git a/t/html.t b/t/html.t index 3c6d8f4..a9ee150 100644 --- a/t/html.t +++ b/t/html.t @@ -5,7 +5,7 @@ use warnings; use Test::More; -plan tests => 53; +plan tests => 55; use_ok('HTML::Form::Simple'); @@ -58,6 +58,15 @@ is( 'hidden options' ); +is_deeply( + [ $form->hidden(foo => [1, 0], {class => 'test'}) ], + [ + '', + '', + ], + 'hidden array' +); + is_deeply( [ $form->hidden({2 => 0, 10 => 1}, {class => 'test'}) ], [ @@ -67,6 +76,19 @@ is_deeply( 'hidden hash' ); +{ + local $, = "\n"; + is( + scalar $form->hidden({2 => [1, 0], 10 => 2}, {class => 'test'}), + join("\n", + '', + '', + '', + ), + 'scalar hiddens' + ); +} + # submit is(