3 # Test ability to retrieve HTTP request info
4 ######################### We start with some black magic to print on failure.
7 unshift @INC, '../lib' if -d '../lib';
10 BEGIN {$| = 1; print "1..5\n"; }
11 END {print "not ok 1\n" unless $loaded;}
12 use CGI::Pretty (':standard','-no_debug','*h3','start_table');
16 ######################### End of black magic.
21 my($num, $true,$msg) = @_;
22 print($true ? "ok $num\n" : "not ok $num $msg\n");
25 # all the automatic tags
26 test(2,h1() eq '<H1>',"single tag");
27 test(3,ol(li('fred'),li('ethel')) eq "<OL>\n\t<LI>\n\t\tfred\n\t</LI>\n\t <LI>\n\t\tethel\n\t</LI>\n</OL>\n","basic indentation");
28 test(4,p('hi',pre('there'),'frog') eq
34 test(5,p('hi',a({-href=>'frog'},'there'),'frog') eq
36 hi <A HREF="frog">there</A>