| 1 |
#!/usr/bin/perl -w |
| 2 |
use strict; |
| 3 |
|
| 4 |
use Test::More tests => 4; |
| 5 |
|
| 6 |
BEGIN{ |
| 7 |
# Disable all ReadLine functionality |
| 8 |
$ENV{PERL_RL} = 0; |
| 9 |
use_ok("WWW::Mechanize::Shell"); |
| 10 |
}; |
| 11 |
|
| 12 |
delete @ENV{qw(HTTP_PROXY http_proxy CGI_HTTP_PROXY)}; |
| 13 |
|
| 14 |
my $output= `$^X -I./lib -MWWW::Mechanize::Shell -e "WWW::Mechanize::Shell->new('t',rcfile=>undef,warnings=>undef)->cmd('restart');print'OK'" 2>&1`; |
| 15 |
chomp $output; |
| •16 |
is($@, "","'restart' on -e doesn't crash"); |
| 17 |
is($?, 0,"'restart' on -e doesn't crash"); |
| 18 |
is($output,"OK","'restart' on -e doesn't crash"); |