X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fp5-CGI-Ex;a=blobdiff_plain;f=t%2F2_fill_06_radio.t;h=3ae260a2edabdb11e9d59ba6a0b09e4cd116ecd2;hp=53ba4ad9d1cce014ca8fcc346cab886aae1f2e09;hb=4eee158dce82376f2f37de29d91c53f60a24aebe;hpb=85070b46d0a93ddbeef07341421adb8389a55418 diff --git a/t/2_fill_06_radio.t b/t/2_fill_06_radio.t index 53ba4ad..3ae260a 100644 --- a/t/2_fill_06_radio.t +++ b/t/2_fill_06_radio.t @@ -1,14 +1,15 @@ # -*- Mode: Perl; -*- -use strict; +=head1 NAME -$^W = 1; +2_fill_06_radio.t - Test CGI::Ex::Fill's ability to fill radio fields -print "1..2\n"; +=cut -use CGI::Ex; +use strict; +use Test::More tests => 2; -print "ok 1\n"; +use_ok('CGI::Ex::Fill'); my $hidden_form_in = qq{ @@ -17,13 +18,8 @@ my $hidden_form_in = qq{ my %fdat = (foo1 => 'bar2'); -my $fif = new CGI::Ex; -my $output = $fif->fill(scalarref => \$hidden_form_in, - fdat => \%fdat); +my $output = CGI::Ex::Fill::form_fill($hidden_form_in, + \%fdat); my $is_checked = join(" ",map { m/checked/ ? "yes" : "no" } split ("\n",$output)); -if ($is_checked eq 'no yes no no'){ - print "ok 2\n"; -} else { - print "Got unexpected is_checked:\n$is_checked\n"; - print "not ok 2\n"; -} +ok($is_checked eq 'no yes no no', + "Should match ($is_checked)");