X-Git-Url: http://git.shiar.net/gitweb.cgi/perl/html-form-simple.git/blobdiff_plain/bb5bd81e03c47ff9cc779c5109bd6e042219a1f8..48891d33a852d6db31113e4e7c10e1cda5771ce3:/t/html.t?ds=sidebyside
diff --git a/t/html.t b/t/html.t
index 2fea804..b4420e1 100644
--- a/t/html.t
+++ b/t/html.t
@@ -5,7 +5,7 @@ use warnings;
use Test::More;
-plan tests => 55;
+plan tests => 59;
use_ok('HTML::Form::Simple');
@@ -356,6 +356,39 @@ is_deeply(
'multiple radios with custom values'
);
+{
+ # make sure arguments aren't modified
+ my @args = (foo => [0, 1], [0, {value => 1}], {name => 0, value => 1});
+ my @orgs = (foo => [0, 1], [0, {value => 1}], {name => 0, value => 1});
+ my @output = (
+ '',
+ '',
+ );
+
+ is_deeply(
+ [ $form->radio(@args) ],
+ \@output,
+ 'options var to radio'
+ );
+
+ is_deeply(
+ [ $form->check(@args) ],
+ [
+ '',
+ '',
+ ],
+ 'options var to check'
+ );
+
+ is(
+ scalar $form->radio(@args),
+ join('', @output),
+ 'options var again to radio'
+ );
+
+ is_deeply(\@args, \@orgs, 'options var unmodified');
+}
+
# check
is(