X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fp5-CGI-Ex;a=blobdiff_plain;f=t%2F2_fill_17_xhtml.t;h=4e4b105d6f280f14940302132629e6db5a165f7f;hp=5fde93b58f6d3b1e6063f340e6bef9fcc35e071c;hb=4eee158dce82376f2f37de29d91c53f60a24aebe;hpb=85070b46d0a93ddbeef07341421adb8389a55418 diff --git a/t/2_fill_17_xhtml.t b/t/2_fill_17_xhtml.t index 5fde93b..4e4b105 100644 --- a/t/2_fill_17_xhtml.t +++ b/t/2_fill_17_xhtml.t @@ -1,13 +1,15 @@ # -*- Mode: Perl; -*- -use strict; +=head1 NAME + +2_fill_17_xhtml.t - Test CGI::Ex::Fill's ability to play nice with XHTML -$^W = 1; +=cut -print "1..1\n"; +use strict; +use Test::More tests => 2; -use CGI::Ex; -use CGI; +use_ok('CGI::Ex::Fill'); my $html = < EOF -my $q = CGI->new; -$q->param('status', 1 ); +my $q = { + status => 1, +}; -my $fif = CGI::Ex->new; - -my $output = $fif->fill( - scalarref => \$html, - fobject => $q -); +my $output = CGI::Ex::Fill::form_fill($html, $q); my $matches; while ($output =~ m!( />)!g) { $matches++; } -if ($matches == 6) { - print "ok 1\n"; -} else { - print "not ok 1\n"; -} - -print $output; +ok($matches == 6, + "Had correct matches ($output)");