Here is an example. Obviously it should not be
successful, but it is:

before
.
Time:  0 wallclock secs ( 0.00 usr +  0.00 sys =  0.00 CPU)

OK (1 tests)

Note, that only "before" was printed.



ta/test.pl:
##################
use strict;
use Test::Unit::TestRunner;

my $r=Test::Unit::TestRunner->new();
$r->start('testcases::test');
##################

testcases/test.pm:
########################
package testcases::test;
use strict;
use Error;

use base qw(Test::Unit::TestCase);

sub test_throwing {
        my $self=shift;

        $self->assert(1, "first");

        print STDERR "before\n";

        throw Error::Simple "sample error from test sub";

        print STDERR "after\n";

        $self->assert(0, "second");
}

1;
########################

_______________________________________________
Perlunit-users mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/perlunit-users

Reply via email to