]> Dogcows Code - chaz/p5-CGI-Ex/blob - t/2_fill_06_radio.t
CGI::Ex 2.00
[chaz/p5-CGI-Ex] / t / 2_fill_06_radio.t
1 # -*- Mode: Perl; -*-
2
3 =head1 NAME
4
5 2_fill_06_radio.t - Test CGI::Ex::Fill's ability to fill radio fields
6
7 =cut
8
9 use strict;
10 use Test::More tests => 2;
11
12 use_ok('CGI::Ex::Fill');
13
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">};
18
19 my %fdat = (foo1 => 'bar2');
20
21 my $output = CGI::Ex::Fill::form_fill($hidden_form_in,
22 \%fdat);
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)");
This page took 0.031818 seconds and 4 git commands to generate.