7 use constant NONEXISTENT => 'http://blahblablah.xx-nonexistent.';
10 if (gethostbyname('blahblahblah.xx-nonexistent.')) {
11 plan skip_all => 'Found an A record for the non-existent domain';
16 eval 'use Test::Exception';
17 plan skip_all => 'Test::Exception required to test autocheck' if $@;
21 BEGIN { delete @ENV{ qw( http_proxy HTTP_PROXY ) }; }
23 use_ok( 'WWW::Mechanize' );
27 my $mech = WWW::Mechanize->new;
28 isa_ok( $mech, 'WWW::Mechanize' );
30 $mech->get( NONEXISTENT );
31 ok( !$mech->success, q{Didn't fetch, but didn't die, either} );
35 my $mech = WWW::Mechanize->new( autocheck => 1 );
36 isa_ok( $mech, 'WWW::Mechanize' );
39 $mech->get( NONEXISTENT );
40 } 'Mech would die 4 u';