4 use Test::More tests => 4;
5 use lib "$FindBin::Bin/lib";
8 use constant NO_SUCH_FILE => "this_file_had_better_not_exist";
11 open(my $fh, '<', NO_SUCH_FILE);
14 ok($@, "lethal throws an exception");
15 isa_ok($@, 'autodie::exception','...which is the correct class');
16 ok($@->matches('open'), "...which matches open");
17 is($@->file,__FILE__, "...which reports the correct file");