14 my $hidden_form_in = qq{<select multiple name="foo1">
15 <option value="0">bar1</option>
16 <option value="bar2">bar2</option>
17 <option value="bar3">bar3</option>
19 <select multiple name="foo2">
20 <option value="bar1">bar1</option>
21 <option value="bar2">bar2</option>
22 <option value="bar3">bar3</option>
24 <select multiple name="foo3">
25 <option value="bar1">bar1</option>
26 <option selected value="bar2">bar2</option>
27 <option value="bar3">bar3</option>
29 <select multiple name="foo4">
30 <option value="bar1">bar1</option>
31 <option selected value="bar2">bar2</option>
32 <option value="bar3">bar3</option>
34 my $q = new CGI( { foo1 => '0',
35 foo2 => ['bar1', 'bar2',],
39 my $fif = new CGI::Ex;
40 my $output = $fif->fill(scalarref => \$hidden_form_in,
42 ignore_fields => ['asdf','foo1','asdf']);
44 my $is_selected = join(" ",map { m/selected/ ? "yes" : "no" } grep /option/, split ("\n",$output));
46 if ($is_selected eq "no no no yes yes no no no no no yes no"){
49 print "Got unexpected is_seleced for select menus:\n$is_selected\n$output\n";