]> Dogcows Code - chaz/p5-CGI-Ex/blob - t/2_fill_02_hidden.t
49c6c759927d2b34d32a79a20c0e37fce64aa4ad
[chaz/p5-CGI-Ex] / t / 2_fill_02_hidden.t
1 # -*- Mode: Perl; -*-
2
3 use strict;
4
5 $^W = 1;
6
7 print "1..2\n";
8
9 use CGI::Ex;
10
11 print "ok 1\n";
12
13 my $hidden_form_in = qq{<input type="hidden" name="foo1">
14 <input type="hidden" name="foo2" value="ack">};
15
16 my %fdat = (foo1a => 'bar1a',
17 foo2 => ['bar2','bar3']);
18
19 my $fif = new CGI::Ex;
20 my $output = $fif->fill(scalarref => \$hidden_form_in,
21 fdat => \%fdat);
22 if ($output =~ m/^<input( (type="hidden"|name="foo1"|value="")){3}>\s*<input( (type="hidden"|name="foo2"|value="bar2")){3}>$/){
23 print "ok 2\n";
24 } else {
25 print "Got unexpected out for hidden form:\n$output\n";
26 print "not ok 2\n";
27 }
This page took 0.038913 seconds and 3 git commands to generate.