in reply to Re: Test::More : I'd need a "not_ok()" function...
in thread Test::More : I'd need a "not_ok()" function...
How do you find this? Not refined, but works.sub not_ok(&$) { my $coderef = shift; my $message = shift; eval $coderef; ok( $@, $message) } # call this way not_ok( sub { mysub('bad data') }, 'message')
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Test::More : I'd need a "not_ok()" function...
by Perl Mouse (Chaplain) on Oct 14, 2005 at 15:25 UTC | |
|
Re^3: Test::More : I'd need a "not_ok()" function...
by philcrow (Priest) on Oct 14, 2005 at 16:01 UTC | |
|
Re^3: Test::More : I'd need a "not_ok()" function...
by bluto (Curate) on Oct 14, 2005 at 16:12 UTC |