5 use Test::More tests => 8;
9 delete @ENV{qw(PATH IFS CDPATH ENV BASH_ENV)}; # Placates taint-unsafe Cwd.pm in 5.6.1
10 use_ok( 'WWW::Mechanize' );
13 my $mech = WWW::Mechanize->new( cookie_jar => undef );
14 isa_ok( $mech, 'WWW::Mechanize' );
16 my $uri = URI::file->new_abs( 't/field.html' )->as_string;
18 my $response = $mech->get( $uri );
19 ok( $response->is_success, "Fetched $uri" );
21 $mech->field( 'dingo', 'Modified!' );
22 is( $mech->value( 'dingo' ), 'Modified!', 'dingo got changed' );
24 $mech->set_visible('bingo', 'bango');
25 is( $mech->value( 'dingo' ), 'bingo', 'dingo changed' );
26 is( $mech->value( 'bongo' ), 'bango', 'bongo changed' );
28 $mech->set_visible( [ radio => 'wongo!' ], 'boingo' );
29 is( $mech->value( 'wango' ), 'wongo!', 'wango changed' );
30 is( $mech->value( 'dingo', 2 ), 'boingo', 'dingo changed' );