]> Dogcows Code - chaz/p5-CGI-Ex/blobdiff - t/2_fill_13_warning.t
CGI::Ex 2.00
[chaz/p5-CGI-Ex] / t / 2_fill_13_warning.t
index 882df1559365676406a1f0e7c07ed2744a1c1b53..beb4010a44e1767e60bcc4bc6059fae568f64e05 100644 (file)
@@ -1,25 +1,29 @@
 # -*- Mode: Perl; -*-
 
-#!/usr/bin/perl -w
+=head1 NAME
+
+2_fill_13_warning.t - Check for no warning on a special case - I can't remember what it was though
+
+=cut
+
+use strict;
+use Test::More tests => 2;
 
 # emits warnings for HTML::FIF <= 0.22
 
-use CGI qw(:no_debug);
-use CGI::Ex;
-use Test;
-
-BEGIN { plan tests => 1 }
-
-local $/;
-my $html = qq{<input type="submit" value="Commit">};
-my $q = new CGI;
-$q->param( "name", "John Smith" );
-my $fif = new CGI::Ex;
-my $output = $fif->fill(
-                         scalarref => \$html,
-                         fobject   => $q
-);
-
-ok($html =~ m!<input( type="submit"| value="Commit"){2}>!);
+use_ok('CGI::Ex::Fill');
+
+SKIP: {
+    skip("CGI.pm not found", 1) if ! eval { require CGI };
+    CGI->import(':no_debug');
+
+    local $/;
+    my $html = qq{<input type="submit" value="Commit">};
+
+    my $q = CGI->new;
+
+    $q->param( "name", "John Smith" );
+    my $output = CGI::Ex::Fill::form_fill($html, $q);
+
+    ok($html =~ m!<input( type="submit"| value="Commit"){2}>!);
+};
This page took 0.018341 seconds and 4 git commands to generate.