X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fp5-CGI-Ex;a=blobdiff_plain;f=t%2F2_fill_05_textarea.t;h=5c1e2dbfb50712a5d1b44078c7a37099c8d6379b;hp=9aa7e592fc79aa798e6c9f07c1c5fedfdd754106;hb=4eee158dce82376f2f37de29d91c53f60a24aebe;hpb=85070b46d0a93ddbeef07341421adb8389a55418 diff --git a/t/2_fill_05_textarea.t b/t/2_fill_05_textarea.t index 9aa7e59..5c1e2db 100644 --- a/t/2_fill_05_textarea.t +++ b/t/2_fill_05_textarea.t @@ -1,39 +1,30 @@ # -*- Mode: Perl; -*- -use strict; +=head1 NAME -$^W = 1; +2_fill_05_textarea.t - Test CGI::Ex::Fill's ability to fill textarea fields -print "1..3\n"; +=cut -use CGI::Ex; +use strict; +use Test::More tests => 3; -print "ok 1\n"; +use_ok('CGI::Ex::Fill'); my $hidden_form_in = qq{}; my %fdat = (foo => 'bar>bar'); -my $fif = new CGI::Ex; -my $output = $fif->fill(scalarref => \$hidden_form_in, - fdat => \%fdat); -if ($output eq ''){ - print "ok 2\n"; -} else { - print "Got unexpected out for $hidden_form_in:\n$output\n"; - print "not ok 2\n"; -} +my $output = CGI::Ex::Fill::form_fill($hidden_form_in, + \%fdat); +ok($output eq '', + "Output should match ($output)"); # empty fdat test %fdat = (foo => ''); -$fif = new CGI::Ex; -$output = $fif->fill(scalarref => \$hidden_form_in, - fdat => \%fdat); -if ($output eq ''){ - print "ok 3\n"; -} else { - print "Got unexpected out for $hidden_form_in:\n$output\n"; - print "not ok 3\n"; -} +$output = CGI::Ex::Fill::form_fill($hidden_form_in, + \%fdat); +ok($output eq '', + "Output should match ($output)");