in reply to Re^2: Test::More : I'd need a "not_ok()" function...
in thread Test::More : I'd need a "not_ok()" function...

The main problem with this is that the routine you are testing *must* die. You can't use it for tests that just return 0 for failure (i.e. the opposite of what "ok()" does). Perhaps it should be named something like "should_die"?

Also, you may want to use 'like()' instead of 'ok()' if you are matching a die message that contains dynamic information (e.g. filename, line number, stack trace, etc).

  • Comment on Re^3: Test::More : I'd need a "not_ok()" function...