]> Dogcows Code - chaz/p5-CGI-Ex/blob - t/2_fill_02_hidden.t
CGI::Ex 2.00
[chaz/p5-CGI-Ex] / t / 2_fill_02_hidden.t
1 # -*- Mode: Perl; -*-
2
3 =head1 NAME
4
5 2_fill_02_hidden.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 = qq{<input type="hidden" name="foo1">
15 <input type="hidden" name="foo2" value="ack">};
16
17 my %fdat = (foo1a => 'bar1a',
18 foo2 => ['bar2','bar3'],
19 );
20
21
22 my $output = CGI::Ex::Fill::form_fill($hidden_form_in,
23 \%fdat);
24 ok($output =~ m/^<input( (type="hidden"|name="foo1"|value="")){3}>\s*<input( (type="hidden"|name="foo2"|value="bar2")){3}>$/,
25 "Hidden should've matched ($output)");
26
This page took 0.031533 seconds and 4 git commands to generate.