1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
|
#!/usr/bin/perl -w
use strict;
use Test::More tests => 2;
SKIP: {
# Disable all ReadLine functionality
$ENV{PERL_RL} = 0;
delete @ENV{qw(HTTP_PROXY http_proxy CGI_HTTP_PROXY)};
use_ok('WWW::Mechanize::Shell');
my $s = WWW::Mechanize::Shell->new( 'test', rcfile => undef, warnings => undef );
my $called;
{ no warnings 'redefine','once';
*WWW::Mechanize::Shell::status = sub {};
};
$s->cmd('get http://999.999.999.999');
is($s->agent->res->code, 500, "LWP returns 500 for host not found");
};
|