in reply to Test::More : I'd need a "not_ok()" function...
Lately, Damian has been urging us to die when things go wrong. If my_sub follows that advice, then you need more than a negated test. You need an eval like this:
Which supports the OP's point that a not_ok might be in order, but only to test for a correct death message.eval { my_sub( 'bad param count' ); }; is( $@, 'your error message', 'test name' );
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Test::More : I'd need a "not_ok()" function...
by wazoox (Prior) on Oct 14, 2005 at 15:05 UTC | |
by Perl Mouse (Chaplain) on Oct 14, 2005 at 15:25 UTC | |
by philcrow (Priest) on Oct 14, 2005 at 16:01 UTC | |
by bluto (Curate) on Oct 14, 2005 at 16:12 UTC |