]> Dogcows Code - chaz/p5-CGI-Ex/blob - t/2_fill_01_form.t
CGI::Ex 2.00
[chaz/p5-CGI-Ex] / t / 2_fill_01_form.t
1 # -*- Mode: Perl; -*-
2
3 =head1 NAME
4
5 2_fill_01_form.t - Test CGI::Ex::Fill's ability to fill hidden fields
6
7 =cut
8
9 use strict;
10 use Test::More tests => 2;
11
12 use_ok('CGI::Ex::Fill');
13
14 my $hidden_form_in = '
15 <INPUT TYPE="TEXT" NAME="foo1" value="nada">
16 <input type="hidden" name="foo2"/>
17 ';
18
19 my %fdat = (foo1 => 'bar1',
20 foo2 => '"bar2"');
21
22
23 my $output = CGI::Ex::Fill::form_fill($hidden_form_in,
24 \%fdat);
25 ok($output =~ m/^\s*<input( (type="TEXT"|name="foo1"|value="bar1")){3}>\s*<input( (type="hidden"|name="foo2"|value="&quot;bar2&quot;")){3}\s*\/>\s*$/i,
26 "Basic case insensitive match worked ($output)");
This page took 0.033054 seconds and 4 git commands to generate.