Subject: | some more tests sensitive to HTTP_PROXY |
I found here (perl-5.8.8, Solaris 8 / RedHat E. Linux 3.0) that some
more tests of W:M:S are sensitive to HTTP_PROXY (or http_proxy!) being
set... please find a patch attached that fixes this.
Cheers,
Marek
Subject: | WWW-Mechanize-Shell.diff |
diff -ruN WWW-Mechanize-Shell-0.41/t/10-nonexistent-host.t WWW-Mechanize-Shell-0.41p1/t/10-nonexistent-host.t
--- WWW-Mechanize-Shell-0.41/t/10-nonexistent-host.t 2003-10-29 16:49:32.000000000 +0100
+++ WWW-Mechanize-Shell-0.41p1/t/10-nonexistent-host.t 2007-04-16 10:17:08.000000000 +0200
@@ -5,7 +5,7 @@
SKIP: {
# Disable all ReadLine functionality
$ENV{PERL_RL} = 0;
-delete $ENV{HTTP_PROXY};
+delete @ENV{qw(HTTP_PROXY http_proxy)};
use_ok('WWW::Mechanize::Shell');
diff -ruN WWW-Mechanize-Shell-0.41/t/13-command-au.t WWW-Mechanize-Shell-0.41p1/t/13-command-au.t
--- WWW-Mechanize-Shell-0.41/t/13-command-au.t 2004-12-02 19:23:22.000000000 +0100
+++ WWW-Mechanize-Shell-0.41p1/t/13-command-au.t 2007-04-16 10:47:08.000000000 +0200
@@ -22,13 +22,14 @@
if ($@);
# We want to be safe from non-resolving local host names
-delete $ENV{HTTP_PROXY};
+delete @ENV{qw(HTTP_PROXY http_proxy)};
# Now start a fake webserver, fork, and connect to ourselves
open SERVER, qq'"$^X" "$FindBin::Bin/401-server" |'
or die "Couldn't spawn fake server : $!";
sleep 1; # give the child some time
my $url = <SERVER>;
+chomp $url;
die unless $url =~ m!^http://([^/]+)/!;
my $host = $1;
diff -ruN WWW-Mechanize-Shell-0.41/t/14-command-identity.t WWW-Mechanize-Shell-0.41p1/t/14-command-identity.t
--- WWW-Mechanize-Shell-0.41/t/14-command-identity.t 2007-04-13 22:30:53.000000000 +0200
+++ WWW-Mechanize-Shell-0.41p1/t/14-command-identity.t 2007-04-16 10:17:48.000000000 +0200
@@ -181,7 +181,7 @@
use Test::HTTP::LocalServer; # from inc
# We want to be safe from non-resolving local host names
-delete $ENV{HTTP_PROXY};
+delete @ENV{qw(HTTP_PROXY http_proxy)};
use vars qw( $actual_requests $dumped_requests );
{
diff -ruN WWW-Mechanize-Shell-0.41/t/16-form-fillout.t WWW-Mechanize-Shell-0.41p1/t/16-form-fillout.t
--- WWW-Mechanize-Shell-0.41/t/16-form-fillout.t 2006-12-14 20:28:12.000000000 +0100
+++ WWW-Mechanize-Shell-0.41p1/t/16-form-fillout.t 2007-04-16 10:17:55.000000000 +0200
@@ -51,7 +51,7 @@
require Test::HTTP::LocalServer; # from inc
# We want to be safe from non-resolving local host names
-delete $ENV{HTTP_PROXY};
+delete @ENV{qw(HTTP_PROXY http_proxy)};
my $actual_requests;
{
diff -ruN WWW-Mechanize-Shell-0.41/t/18-browser-autosync.t WWW-Mechanize-Shell-0.41p1/t/18-browser-autosync.t
--- WWW-Mechanize-Shell-0.41/t/18-browser-autosync.t 2003-08-03 04:46:20.000000000 +0200
+++ WWW-Mechanize-Shell-0.41p1/t/18-browser-autosync.t 2007-04-16 10:18:10.000000000 +0200
@@ -33,7 +33,7 @@
if ($@);
use lib 'inc';
require Test::HTTP::LocalServer; # from inc
- delete $ENV{HTTP_PROXY};
+ delete @ENV{qw(HTTP_PROXY http_proxy)};
};
my $browser_synced;
diff -ruN WWW-Mechanize-Shell-0.41/t/20-restart-without-script.t WWW-Mechanize-Shell-0.41p1/t/20-restart-without-script.t
--- WWW-Mechanize-Shell-0.41/t/20-restart-without-script.t 2003-06-09 12:47:54.000000000 +0200
+++ WWW-Mechanize-Shell-0.41p1/t/20-restart-without-script.t 2007-04-16 10:18:18.000000000 +0200
@@ -9,7 +9,7 @@
use_ok("WWW::Mechanize::Shell");
};
-delete $ENV{HTTP_PROXY};
+delete @ENV{qw(HTTP_PROXY http_proxy)};
my $output= `$^X -Ilib -MWWW::Mechanize::Shell -e "WWW::Mechanize::Shell->new('t',rcfile=>undef,warnings=>undef)->cmd('restart');print'OK'" 2>&1`;
chomp $output;
diff -ruN WWW-Mechanize-Shell-0.41/t/23-check-dumpresponses.t WWW-Mechanize-Shell-0.41p1/t/23-check-dumpresponses.t
--- WWW-Mechanize-Shell-0.41/t/23-check-dumpresponses.t 2003-08-03 04:46:20.000000000 +0200
+++ WWW-Mechanize-Shell-0.41p1/t/23-check-dumpresponses.t 2007-04-16 10:25:09.000000000 +0200
@@ -12,6 +12,7 @@
# Disable all ReadLine functionality
$ENV{PERL_RL} = 0;
+delete @ENV{qw(HTTP_PROXY http_proxy)};
use_ok('WWW::Mechanize::Shell');
my $s = WWW::Mechanize::Shell->new( 'test', rcfile => undef, warnings => undef );
diff -ruN WWW-Mechanize-Shell-0.41/t/24-source-file.t WWW-Mechanize-Shell-0.41p1/t/24-source-file.t
--- WWW-Mechanize-Shell-0.41/t/24-source-file.t 2003-08-02 21:07:23.000000000 +0200
+++ WWW-Mechanize-Shell-0.41p1/t/24-source-file.t 2007-04-16 10:32:32.000000000 +0200
@@ -12,6 +12,7 @@
# Disable all ReadLine functionality
$ENV{PERL_RL} = 0;
+delete @ENV{qw(HTTP_PROXY http_proxy)};
delete $ENV{PAGER}
if $ENV{PAGER};
$ENV{PERL_HTML_DISPLAY_CLASS}="HTML::Display::Dump";
diff -ruN WWW-Mechanize-Shell-0.41/t/25-save-file-nolink.t WWW-Mechanize-Shell-0.41p1/t/25-save-file-nolink.t
--- WWW-Mechanize-Shell-0.41/t/25-save-file-nolink.t 2003-08-03 01:35:39.000000000 +0200
+++ WWW-Mechanize-Shell-0.41p1/t/25-save-file-nolink.t 2007-04-16 10:35:10.000000000 +0200
@@ -12,6 +12,7 @@
# Disable all ReadLine functionality
$ENV{PERL_RL} = 0;
+delete @ENV{qw(HTTP_PROXY http_proxy)};
delete $ENV{PAGER}
if $ENV{PAGER};
$ENV{PERL_HTML_DISPLAY_CLASS}="HTML::Display::Dump";