Hmm, that's odd, can you post a cut-down (but complete) version of your code which shows this problem. I.e. a complete runnable test script with only the one test and the code it calls which dies? Something like this:
use Test::More tests => 2; BEGIN { use_ok("Test::Exception"); } sub slayme { die "Error message"; } throws_ok { slayme() } qr/Error message/,"Dies correctly"; __OUTPUT__ 1..2 ok 1 - use Test::Exception; ok 2 - Dies correctly
In reply to Re^5: testing a croak
by tirwhan
in thread testing a croak
by arcnon
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |