X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fp5-CGI-Ex;a=blobdiff_plain;f=t%2F2_fill_13_warning.t;h=beb4010a44e1767e60bcc4bc6059fae568f64e05;hp=882df1559365676406a1f0e7c07ed2744a1c1b53;hb=4eee158dce82376f2f37de29d91c53f60a24aebe;hpb=85070b46d0a93ddbeef07341421adb8389a55418 diff --git a/t/2_fill_13_warning.t b/t/2_fill_13_warning.t index 882df15..beb4010 100644 --- a/t/2_fill_13_warning.t +++ b/t/2_fill_13_warning.t @@ -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{}; - -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!!); +use_ok('CGI::Ex::Fill'); + +SKIP: { + skip("CGI.pm not found", 1) if ! eval { require CGI }; + CGI->import(':no_debug'); + + local $/; + my $html = qq{}; + + my $q = CGI->new; + + $q->param( "name", "John Smith" ); + my $output = CGI::Ex::Fill::form_fill($html, $q); + + ok($html =~ m!!); +};