8 eval 'use Test::Taint';
9 plan skip_all => 'Test::Taint required for checking taintedness' if $@;
13 BEGIN { delete @ENV{ qw( http_proxy HTTP_PROXY ) }; }
15 use_ok( 'WWW::Mechanize' );
18 my $mech = WWW::Mechanize->new( autocheck => 1 );
19 isa_ok( $mech, 'WWW::Mechanize', 'Created object' );
21 $mech->get( 'file:t/google.html' );
23 # Make sure taint checking is on correctly
25 tainted_ok( $ENV{ $keys[0] }, 'ENV taints OK' );
27 is( $mech->title, 'Google', 'Correct title' );
28 untainted_ok( $mech->title, 'Title should not be tainted' );
30 tainted_ok( $mech->content, 'But content should' );