summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1998-07-14 06:01:12 +0000
committerGurusamy Sarathy <gsar@cpan.org>1998-07-14 06:01:12 +0000
commite46ffa5519210e11f4d5bc2cb87a6423b98ac426 (patch)
tree80eb9310757393f5c903e9a1553dbbd622b37690 /t
parent970d0ca27a2290119cbaa2df59b308a84a879664 (diff)
downloadperl-e46ffa5519210e11f4d5bc2cb87a6423b98ac426.tar.gz
more VMS patches from Dan Sugalski <sugalskd@osshe.edu>
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
Diffstat (limited to 't')
-rwxr-xr-xt/io/iprefix.t6
-rwxr-xr-xt/lib/cgi-html.t11
2 files changed, 12 insertions, 5 deletions
diff --git a/t/io/iprefix.t b/t/io/iprefix.t
index b7ade31576..10a5c5f686 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 40014dcef2..d7f3ffb4aa 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 '<H1>fred-agnes-maura</H1>',"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 <<END,"start_html()");
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<HTML><HEAD><TITLE>Untitled Document</TITLE>
@@ -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)");