X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Flib%2Fcgi-pretty.t;h=14f6447033aaa285f7bf055d1c8b18f41f12c4d0;hb=22d4bb9ccb8701e68f9243547d7e3a3c55f70908;hp=e217a7dbd4951a9f00344e430e4603d83ad75ef2;hpb=4b19af017623bfa3bb72bb164598a517f586e0d3;p=p5sagit%2Fp5-mst-13.2.git diff --git a/t/lib/cgi-pretty.t b/t/lib/cgi-pretty.t index e217a7d..14f6447 100755 --- a/t/lib/cgi-pretty.t +++ b/t/lib/cgi-pretty.t @@ -1,12 +1,14 @@ -#!./perl +#!/usr/local/bin/perl -w -# Test ability to retrieve HTTP request info -######################### We start with some black magic to print on failure. BEGIN { - chdir 't' if -d 't'; - unshift @INC, '../lib' if -d '../lib'; + chdir('t') if -d 't'; + @INC = '../lib'; } +# Test ability to retrieve HTTP request info +######################### We start with some black magic to print on failure. +use lib '../blib/lib','../blib/arch'; + BEGIN {$| = 1; print "1..5\n"; } END {print "not ok 1\n" unless $loaded;} use CGI::Pretty (':standard','-no_debug','*h3','start_table'); @@ -23,17 +25,17 @@ sub test { } # all the automatic tags -test(2,h1() eq '
- hi
there+'
+ hi
therefrog - + ',"
tags"); test(5,p('hi',a({-href=>'frog'},'there'),'frog') eq -'- hi there +'
+ hi there frog -
+ ',"as-is");