From: Gurusamy Sarathy Date: Tue, 14 Jul 1998 06:01:12 +0000 (+0000) Subject: more VMS patches from Dan Sugalski X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=e46ffa5519210e11f4d5bc2cb87a6423b98ac426;p=p5sagit%2Fp5-mst-13.2.git more VMS patches from Dan Sugalski Date: Mon, 13 Jul 1998 16:37:49 -0700 Message-Id: <3.0.5.32.19980713163749.00af1c40@ous.edu> Subject: [PATCH 5.004_73]t/io/iprefix.t patch for VMS -- Date: Mon, 13 Jul 1998 15:51:09 -0700 Message-Id: <3.0.5.32.19980713155109.00a52c30@ous.edu> Subject: [PATCH5.004_73]Tweak t/lib/cgi-html.t to work on VMS p4raw-id: //depot/perl@1482 --- diff --git a/t/io/iprefix.t b/t/io/iprefix.t index b7ade31..10a5c5f 100755 --- a/t/io/iprefix.t +++ b/t/io/iprefix.t @@ -13,6 +13,12 @@ if ($^O eq 'MSWin32') { `.\\perl -le "print 'foo'" > .b`; `.\\perl -le "print 'foo'" > .c`; } +elsif ($^O eq 'VMS') { + $CAT = 'MCR []perl. -e "print<>"'; + `MCR []perl. -le "print 'foo'" > ./.a`; + `MCR []perl. -le "print 'foo'" > ./.b`; + `MCR []perl. -le "print 'foo'" > ./.c`; +} else { $CAT = 'cat'; `echo foo | tee .a .b .c`; diff --git a/t/lib/cgi-html.t b/t/lib/cgi-html.t index 40014dc..d7f3ffb 100755 --- a/t/lib/cgi-html.t +++ b/t/lib/cgi-html.t @@ -9,6 +9,7 @@ BEGIN { } BEGIN {$| = 1; print "1..17\n"; } +BEGIN {$eol = $^O eq 'VMS' ? "\n" : "\cM\cJ";} END {print "not ok 1\n" unless $loaded;} use CGI (':standard','-no_debug'); $loaded = 1; @@ -36,10 +37,10 @@ test(7,h1({-align=>'CENTER'},['fred','agnes']) eq local($") = '-'; test(8,h1('fred','agnes','maura') eq '

fred-agnes-maura

',"open/close tag \$\" interpolation"); } -test(9,header() eq "Content-Type: text/html\r\n\r\n","header()"); -test(10,header(-type=>'image/gif') eq "Content-Type: image/gif\r\n\r\n","header()"); -test(11,header(-type=>'image/gif',-status=>'500 Sucks') eq "Status: 500 Sucks\r\nContent-Type: image/gif\r\n\r\n","header()"); -test(12,header(-nph=>1) eq "HTTP/1.0 200 OK\r\nContent-Type: text/html\r\n\r\n","header()"); +test(9,header() eq "Content-Type: text/html${eol}${eol}","header()"); +test(10,header(-type=>'image/gif') eq "Content-Type: image/gif${eol}${eol}","header()"); +test(11,header(-type=>'image/gif',-status=>'500 Sucks') eq "Status: 500 Sucks${eol}Content-Type: image/gif${eol}${eol}","header()"); +test(12,header(-nph=>1) eq "HTTP/1.0 200 OK${eol}Content-Type: text/html${eol}${eol}","header()"); test(13,start_html() ."\n" eq < Untitled Document @@ -60,5 +61,5 @@ END ; test(16,($cookie=cookie(-name=>'fred',-value=>['chocolate','chip'],-path=>'/')) eq 'fred=chocolate&chip; path=/',"cookie()"); -test(17,header(-Cookie=>$cookie) =~ m!^Set-Cookie: fred=chocolate&chip\; path=/\r\nDate:.*\r\nContent-Type: text/html\r\n\r\n!s, +test(17,header(-Cookie=>$cookie) =~ m!^Set-Cookie: fred=chocolate&chip\; path=/${eol}Date:.*${eol}Content-Type: text/html${eol}${eol}!s, "header(-cookie)");