background image
<< Bad Input Can Do Bad Things | Tests with warnings >>
<< Bad Input Can Do Bad Things | Tests with warnings >>
Basic bad input example
Basic bad input example
use Test::More tests => 2;
local $!;
ok( !open(FILE, "I_dont_exist"), 'non-existent file' );
isnt( $!, 0, ' $! set' );
Note, the exact value of $! is unpredictable.