]> Dogcows Code - chaz/p5-CGI-Ex/blob - t/2_fill_05_textarea.t
9aa7e592fc79aa798e6c9f07c1c5fedfdd754106
[chaz/p5-CGI-Ex] / t / 2_fill_05_textarea.t
1 # -*- Mode: Perl; -*-
2
3 use strict;
4
5 $^W = 1;
6
7 print "1..3\n";
8
9 use CGI::Ex;
10
11 print "ok 1\n";
12
13 my $hidden_form_in = qq{<TEXTAREA NAME="foo">blah</TEXTAREA>};
14
15 my %fdat = (foo => 'bar>bar');
16
17 my $fif = new CGI::Ex;
18 my $output = $fif->fill(scalarref => \$hidden_form_in,
19 fdat => \%fdat);
20 if ($output eq '<TEXTAREA NAME="foo">bar&gt;bar</TEXTAREA>'){
21 print "ok 2\n";
22 } else {
23 print "Got unexpected out for $hidden_form_in:\n$output\n";
24 print "not ok 2\n";
25 }
26
27 # empty fdat test
28
29 %fdat = (foo => '');
30
31 $fif = new CGI::Ex;
32 $output = $fif->fill(scalarref => \$hidden_form_in,
33 fdat => \%fdat);
34 if ($output eq '<TEXTAREA NAME="foo"></TEXTAREA>'){
35 print "ok 3\n";
36 } else {
37 print "Got unexpected out for $hidden_form_in:\n$output\n";
38 print "not ok 3\n";
39 }
This page took 0.031587 seconds and 3 git commands to generate.