X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fp5-CGI-Ex;a=blobdiff_plain;f=t%2F2_fill_10_escape.t;h=e32fc9fd934e32803fe10349bd22dc91702be8ce;hp=fbacf042534cbb5cb8f2113822bb1ca66b7bc335;hb=4eee158dce82376f2f37de29d91c53f60a24aebe;hpb=85070b46d0a93ddbeef07341421adb8389a55418 diff --git a/t/2_fill_10_escape.t b/t/2_fill_10_escape.t index fbacf04..e32fc9f 100644 --- a/t/2_fill_10_escape.t +++ b/t/2_fill_10_escape.t @@ -1,10 +1,16 @@ # -*- Mode: Perl; -*- +=head1 NAME + +2_fill_10_escape.t - Make sure CGI::Ex::Fill works with escaped values. + +=cut + use strict; +use Test::More tests => 2; + +use_ok('CGI::Ex::Fill'); -print "1..1\n"; -use CGI::Ex; - my $html =<<"__HTML__"; @@ -29,15 +35,12 @@ __HTML__ my %fdat = (); -my $fif = CGI::Ex->new; -my $output = $fif->fill(scalarref => \$html, - fdat => \%fdat); +my $output = CGI::Ex::Fill::form_fill($html, + \%fdat); # FIF changes order of HTML attributes, so split strings and sort my $strings_output = join("\n", sort split(/[\s><]+/, lc($output))); my $strings_html = join("\n", sort split(/[\s><]+/, lc($html))); -unless ($strings_output eq $strings_html){ - print "not "; -} -print "ok 1"; +ok($strings_output eq $strings_html, + "Strings matched");