X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fp5-CGI-Ex;a=blobdiff_plain;f=t%2F2_fill_09_default_type.t;h=1320fdbe4625b7d2c7cea8d74dde77f42062849d;hp=5db1f59af402d613553f4d06be341f44629ab6c0;hb=4eee158dce82376f2f37de29d91c53f60a24aebe;hpb=85070b46d0a93ddbeef07341421adb8389a55418 diff --git a/t/2_fill_09_default_type.t b/t/2_fill_09_default_type.t index 5db1f59..1320fdb 100644 --- a/t/2_fill_09_default_type.t +++ b/t/2_fill_09_default_type.t @@ -1,14 +1,16 @@ # -*- Mode: Perl; -*- -use strict; +=head1 NAME + +2_fill_09_default_type.t - Test CGI::Ex::Fill's ability to set default falues -$^W = 1; +=cut -print "1..2\n"; +use strict; +use Test::More tests => 2; -use CGI::Ex; +use_ok('CGI::Ex::Fill'); -print "ok 1\n"; my $hidden_form_in = qq{ }; @@ -16,12 +18,7 @@ my $hidden_form_in = qq{ my %fdat = (foo1 => 'bar1', foo2 => 'bar2'); -my $fif = new CGI::Ex; -my $output = $fif->fill(scalarref => \$hidden_form_in, - fdat => \%fdat); -if ($output =~ m/^\s*$/i){ - 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 =~ m/^\s*$/i, + "Should match ($output)");