Here's the minimal test case:

  use lib 't/lib';
  use My::Test::More 'no_plan';

  sub foo {
      die 'some problem' if @_;
      return 1;
  }

  ok foo(),  'this lives';
  ok foo(1), 'this dies';

And My::Test::More (a stripped down version of
http://use.perl.org/~Ovid/journal/32614):

  package My::Test::More;

  use base 'Test::Builder::Module';
  use Test::More;

  @EXPORT    = @Test::More::EXPORT;

  1;

When I run the tests (happens with both runtests and prove):

  runtests -lpv -It/lib -It/tests --merge "t/confess.t"
  t/confess......
  ok 1 - this lives
  some problem at t/confess.t line 5.
  1..1
  ok
  All tests successful.
  Files=1, Tests=1,  0 wallclock secs ( 0.01 cusr +  0.05 csys =  0.05
CPU)

The second test dies but this is ignored.  Change My::Test::More to
Test::More and the failure is correctly reported.  What did I miss in
My::Test::More?

Cheers,
Ovid

--

Buy the book -- http://www.oreilly.com/catalog/perlhks/
Perl and CGI -- http://users.easystreet.com/ovid/cgi_course/

Reply via email to