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