This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
more VMS patches from Dan Sugalski <sugalskd@osshe.edu>
authorGurusamy Sarathy <gsar@cpan.org>
Tue, 14 Jul 1998 06:01:12 +0000 (06:01 +0000)
committerGurusamy Sarathy <gsar@cpan.org>
Tue, 14 Jul 1998 06:01:12 +0000 (06:01 +0000)
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

t/io/iprefix.t
t/lib/cgi-html.t

index b7ade31..10a5c5f 100755 (executable)
@@ -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`;
index 40014dc..d7f3ffb 100755 (executable)
@@ -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)");