]> Dogcows Code - chaz/p5-CGI-Ex/blob - t/2_fill_05_textarea.t
CGI::Ex 2.00
[chaz/p5-CGI-Ex] / t / 2_fill_05_textarea.t
1 # -*- Mode: Perl; -*-
2
3 =head1 NAME
4
5 2_fill_05_textarea.t - Test CGI::Ex::Fill's ability to fill textarea fields
6
7 =cut
8
9 use strict;
10 use Test::More tests => 3;
11
12 use_ok('CGI::Ex::Fill');
13
14 my $hidden_form_in = qq{<TEXTAREA NAME="foo">blah</TEXTAREA>};
15
16 my %fdat = (foo => 'bar>bar');
17
18 my $output = CGI::Ex::Fill::form_fill($hidden_form_in,
19 \%fdat);
20 ok($output eq '<TEXTAREA NAME="foo">bar&gt;bar</TEXTAREA>',
21 "Output should match ($output)");
22
23 # empty fdat test
24
25 %fdat = (foo => '');
26
27 $output = CGI::Ex::Fill::form_fill($hidden_form_in,
28 \%fdat);
29 ok($output eq '<TEXTAREA NAME="foo"></TEXTAREA>',
30 "Output should match ($output)");
This page took 0.03024 seconds and 4 git commands to generate.