]> Dogcows Code - chaz/p5-CGI-Ex/blob - t/2_fill_17_xhtml.t
5fde93b58f6d3b1e6063f340e6bef9fcc35e071c
[chaz/p5-CGI-Ex] / t / 2_fill_17_xhtml.t
1 # -*- Mode: Perl; -*-
2
3 use strict;
4
5 $^W = 1;
6
7 print "1..1\n";
8
9 use CGI::Ex;
10 use CGI;
11
12 my $html = <<EOF;
13 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
14 "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
15 <html>
16 <body>
17 <input type="radio" name="status" value=0 />Canceled<br>
18 <input type="radio" name="status" value=1 />Confirmed<br>
19 <input type="radio" name="status" value=2 />Wait List<br>
20
21 <input type="radio" name="status" value=3 />No Show<br>
22 <input type="radio" name="status" value=4 />Moved to Another Class<br>
23 <input type="radio" name="status" value=5 />Late Cancel<br>
24 </body>
25 </html>
26 EOF
27
28 my $q = CGI->new;
29 $q->param('status', 1 );
30
31 my $fif = CGI::Ex->new;
32
33 my $output = $fif->fill(
34 scalarref => \$html,
35 fobject => $q
36 );
37
38 my $matches;
39 while ($output =~ m!( />)!g) {
40 $matches++;
41 }
42
43 if ($matches == 6) {
44 print "ok 1\n";
45 } else {
46 print "not ok 1\n";
47 }
48
49 print $output;
This page took 0.032477 seconds and 3 git commands to generate.