X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=t%2F2_fill_14_password.t;h=a1857acad61494b95c2025c9a1a40b719d75d887;hb=HEAD;hp=ddb56f67f60b466524efbbff2fbf27913d4f1a42;hpb=85070b46d0a93ddbeef07341421adb8389a55418;p=chaz%2Fp5-CGI-Ex diff --git a/t/2_fill_14_password.t b/t/2_fill_14_password.t index ddb56f6..a1857ac 100644 --- a/t/2_fill_14_password.t +++ b/t/2_fill_14_password.t @@ -1,39 +1,25 @@ # -*- Mode: Perl; -*- -#!/usr/bin/perl -w +=head1 NAME -use CGI qw(:no_debug); -use CGI::Ex; -use Test; +2_fill_13_password.t - Test CGI::Ex::Fill's ability to not fill passwords -BEGIN { plan tests => 2 } +=cut + +use strict; +use Test::More tests => 3; + +use_ok('CGI::Ex::Fill'); local $/; my $html = qq{}; -my $q = new CGI; -$q->param( foo => 'bar' ); - -{ - my $fif = new CGI::Ex; - my $output = $fif->fill( - scalarref => \$html, - fobject => $q, - fill_password => 0, - ); - - ok($output !~ /value="bar"/); -} - - -{ - my $fif = new CGI::Ex; - my $output = $fif->fill( - scalarref => \$html, - fobject => $q, -# fill_password => 1, - ); - - ok($output =~ /value="bar"/); -} +my $q = {foo => 'bar'}; + +my $output = CGI::Ex::Fill::form_fill($html, $q, undef, 0); +ok($output !~ /value="bar"/); + +$output = CGI::Ex::Fill::form_fill($html, $q, undef); +ok($output =~ /value="bar"/); +