5 2_fill_06_radio.t - Test CGI::Ex::Fill's ability to fill radio fields
10 use Test::More tests => 2;
12 use_ok('CGI::Ex::Fill');
14 my $hidden_form_in = qq{<INPUT TYPE="radio" NAME="foo1" value="bar1">
15 <input type="radio" name="foo1" value="bar2">
16 <input type="radio" name="foo1" value="bar3">
17 <input type="radio" name="foo1" checked value="bar4">};
19 my %fdat = (foo1 => 'bar2');
21 my $output = CGI::Ex::Fill::form_fill($hidden_form_in,
23 my $is_checked = join(" ",map { m/checked/ ? "yes" : "no" } split ("\n",$output));
24 ok($is_checked eq 'no yes no no',
25 "Should match ($is_checked)");