summaryrefslogtreecommitdiff
path: root/cpan
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2010-10-14 14:04:55 -0700
committerFather Chrysostomos <sprout@cpan.org>2010-10-14 14:40:00 -0700
commit582bd8796b98142a11f99996b4e934a363b2cac0 (patch)
tree1881a24529a6d84f9db9df00e2c4dba7991cdaa3 /cpan
parent647a6853e64193dea1a29579aae3a477bcfbac3c (diff)
downloadperl-582bd8796b98142a11f99996b4e934a363b2cac0.tar.gz
Make cpan/CGI/t/http.t (hopefully) compatible with VMS
I will submit a similar patch upstream in a few days.
Diffstat (limited to 'cpan')
-rw-r--r--cpan/CGI/t/http.t7
1 files changed, 4 insertions, 3 deletions
diff --git a/cpan/CGI/t/http.t b/cpan/CGI/t/http.t
index c46c8ffa7f..2ed38631d6 100644
--- a/cpan/CGI/t/http.t
+++ b/cpan/CGI/t/http.t
@@ -7,8 +7,6 @@ use lib qw(t/lib);
use Test::More tests => 7;
use CGI;
-%ENV=();
-
my $cgi = CGI->new();
{
@@ -36,8 +34,11 @@ my $cgi = CGI->new();
# https()
# The same as http(), but operates on the HTTPS environment variables present when the SSL protocol is in
# effect. Can be used to determine whether SSL is turned on.
+ my @expect = grep /^HTTPS/, keys %ENV;
+ push @expect, 'HTTPS' if not exists $ENV{HTTPS};
+ push @expect, 'HTTPS_KEYSIZE' if not exists $ENV{HTTPS_KEYSIZE};
local $ENV{'HTTPS'} = 'ON';
local $ENV{'HTTPS_KEYSIZE'} = 512;
is $cgi->https(), 'ON', 'scalar context to check SSL is on';
- ok eq_set( [$cgi->https()], [qw(HTTPS HTTPS_KEYSIZE)]), 'list context returns https keys';
+ ok eq_set( [$cgi->https()], \@expect), 'list context returns https keys';
}