1 #!/usr/local/bin/perl -w
3 # Test ability to retrieve HTTP request info
4 ######################### We start with some black magic to print on failure.
5 use lib '../blib/lib','../blib/arch';
7 BEGIN {$| = 1; print "1..5\n"; }
8 END {print "not ok 1\n" unless $loaded;}
9 use CGI::Pretty (':standard','-no_debug','*h3','start_table');
13 ######################### End of black magic.
18 my($num, $true,$msg) = @_;
19 print($true ? "ok $num\n" : "not ok $num $msg\n");
22 # all the automatic tags
23 test(2,h1() eq '<h1>',"single tag");
24 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");
25 test(4,p('hi',pre('there'),'frog') eq
31 test(5,p('hi',a({-href=>'frog'},'there'),'frog') eq
33 hi <a href="frog">there</a>