WWW-Mechanize-Shell
view release on metacpan or search on metacpan
cause problems if you're running Perl 5.10.0. All tests pass.
0.46 2007-10-03
* Bump version because of borked CPAN upload, retrying
* No need to upgrade
0.45 2007-10-03
* No library code changes, no need to upgrade
* Removed HTML::Display from the distribution
as that now lives its own life on CPAN
* Fix failing tests if HTTP_PROXY was set. This fixes
Debian bug #444634, http://bugs.debian.org/444634
and CPAN RT #29455, thanks to Niko Tyni
0.44 2007-07-07
* Added C<title> and C<headers> commands that print out
the title and headers of the page. Suggested by Ed Halley.
* Added and documented arguments to the C<< shell >> subroutine
* Quieted up some test warnings
* IO::Catch now understands C<printf>
t/13-command-au.t view on Meta::CPAN
# pre-5.8.0's warns aren't caught by a tied STDERR.
tie *STDOUT, 'IO::Catch', '_STDOUT_' or die $!;
# Disable all ReadLine functionality
$ENV{PERL_RL} = 0;
use Test::More tests => 4;
use WWW::Mechanize::Shell;
delete @ENV{qw(HTTP_PROXY http_proxy CGI_HTTP_PROXY)};
my $server = Test::HTTP::LocalServer->spawn();
my $user = 'foo';
my $pass = 'bar';
my $url = URI->new( $server->basic_auth($user => $pass));
my $host = $url->host;
my $s = WWW::Mechanize::Shell->new( 'test', rcfile => undef, warnings => undef );
t/14-command-identity.t view on Meta::CPAN
#require LWP::UserAgent;
#my $old = \&LWP::UserAgent::request;
#print STDERR $old;
#*LWP::UserAgent::request = sub {print STDERR "LWP::UserAgent::request\n"; goto &$old };
};
use WWW::Mechanize::Shell;
SKIP: {
# We want to be safe from non-resolving local host names
delete @ENV{qw(HTTP_PROXY http_proxy CGI_HTTP_PROXY)};
our ($actual_requests, $dumped_requests );
{
no warnings qw'redefine once';
my $old_request = *WWW::Mechanize::_make_request{CODE};
*WWW::Mechanize::_make_request = sub {
$actual_requests++;
goto &$old_request;
};
t/16-form-fillout.t view on Meta::CPAN
delete $ENV{PAGER};
$ENV{PERL_RL} = 0;
};
use WWW::Mechanize::Shell;
SKIP: {
# Disable all ReadLine functionality
my $HTML = do { local $/; <DATA> };
# We want to be safe from non-resolving local host names
delete @ENV{qw(HTTP_PROXY http_proxy CGI_HTTP_PROXY)};
my $actual_requests;
{
no warnings 'redefine';
my $old_request = *WWW::Mechanize::request{CODE};
*WWW::Mechanize::request = sub {
$actual_requests++;
goto &$old_request;
};
t/18-browser-autosync.t view on Meta::CPAN
reload => { count => 2, commands => ['get %s','reload'] },
);
plan tests => scalar (keys %tests);
BEGIN {
# Disable all ReadLine functionality
$ENV{PERL_RL} = 0;
};
use WWW::Mechanize::Shell;
delete @ENV{qw(HTTP_PROXY http_proxy CGI_HTTP_PROXY)};
my $browser_synced;
{ no warnings 'redefine';
*WWW::Mechanize::Shell::sync_browser = sub {
$browser_synced++;
};
};
my $server = Test::HTTP::LocalServer->spawn();
t/20-restart-without-script.t view on Meta::CPAN
use strict;
use Test::More tests => 4;
BEGIN{
# Disable all ReadLine functionality
$ENV{PERL_RL} = 0;
use_ok("WWW::Mechanize::Shell");
};
delete @ENV{qw(HTTP_PROXY http_proxy CGI_HTTP_PROXY)};
my $output= `$^X -I./lib -MWWW::Mechanize::Shell -e "WWW::Mechanize::Shell->new('t',rcfile=>undef,warnings=>undef)->cmd('restart');print'OK'" 2>&1`;
chomp $output;
is($@, "","'restart' on -e dosen't crash");
is($?, 0,"'restart' on -e dosen't crash");
is($output,"OK","'restart' on -e dosen't crash");
t/23-check-dumpresponses.t view on Meta::CPAN
use Test::HTTP::LocalServer;
our ($_STDOUT_, $_STDERR_);
tie *STDOUT, 'IO::Catch', '_STDOUT_' or die $!;
tie *STDERR, 'IO::Catch', '_STDERR_' or die $!;
use Test::More tests => 5;
# 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 );
# Now test
my $server = Test::HTTP::LocalServer->spawn();
{ no warnings 'redefine','once';
local *WWW::Mechanize::Shell::status = sub {};
t/24-source-file.t view on Meta::CPAN
tie *STDERR, 'IO::Catch', '_STDERR_' or die $!;
use Test::More tests => 5;
# Disable all ReadLine functionality
$ENV{PERL_RL} = 0;
delete $ENV{PAGER}
if $ENV{PAGER};
$ENV{PERL_HTML_DISPLAY_CLASS}="HTML::Display::Dump";
delete @ENV{qw(HTTP_PROXY http_proxy CGI_HTTP_PROXY)};
require WWW::Mechanize::Shell;
my $s = WWW::Mechanize::Shell->new( 'test', rcfile => undef, warnings => undef );
# Now test
my $server = Test::HTTP::LocalServer->spawn();
{ no warnings 'redefine','once';
local *WWW::Mechanize::Shell::status = sub {};
t/25-save-file-nolink.t view on Meta::CPAN
use Test::HTTP::LocalServer;
our ($_STDOUT_, $_STDERR_);
tie *STDOUT, 'IO::Catch', '_STDOUT_' or die $!;
tie *STDERR, 'IO::Catch', '_STDERR_' or die $!;
use Test::More tests => 6;
# Disable all ReadLine functionality
$ENV{PERL_RL} = 0;
delete @ENV{qw(HTTP_PROXY http_proxy CGI_HTTP_PROXY)};
delete $ENV{PAGER}
if $ENV{PAGER};
$ENV{PERL_HTML_DISPLAY_CLASS}="HTML::Display::Dump";
use_ok('WWW::Mechanize::Shell');
my $s = WWW::Mechanize::Shell->new( 'test', rcfile => undef, warnings => undef );
# Now test
my $server = Test::HTTP::LocalServer->spawn();
( run in 1.044 second using v1.01-cache-2.11-cpan-d7a12ab2c7f )