]> Dogcows Code - chaz/p5-CGI-Ex/blobdiff - t/2_fill_19_complex.t
CGI::Ex 2.00
[chaz/p5-CGI-Ex] / t / 2_fill_19_complex.t
index 7a867350a8634490536e8210b061a211c7f4dca0..4852f57664c382109f2cf9947138244bff9c1d18 100644 (file)
@@ -1,14 +1,15 @@
 # -*- Mode: Perl; -*-
 
-use strict;
+=head1 NAME
 
-$^W = 1;
+2_fill_19_complex.t - Test CGI::Ex::Fill's regex against difficult tags (with embeded html)
 
-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 $string = qq{
 <input attr="<br value='waw'>
@@ -18,13 +19,9 @@ my $string = qq{
 my %fdat = (foo1 => 'bar1');
 
 
-my $cgix = new CGI::Ex;
-$cgix->fill(text => \$string,
-            form => \%fdat,
-            );
+CGI::Ex::Fill::form_fill(\$string,
+                         \%fdat,
+                         );
 
-if ($string =~ m/ value="bar1"/) {
-  print "ok 2\n";
-} else {
-  print "not ok 2\n";
-}
+ok($string =~ m/ value="bar1"/,
+   "Should match ($string)");
This page took 0.019429 seconds and 4 git commands to generate.