2 # $Id: /mirror/googlecode/test-more/t/fail.t 57943 2008-08-18T02:09:22.275428Z brooklyn.kid51 $
5 if( $ENV{PERL_CORE} ) {
7 @INC = ('../lib', 'lib');
10 unshift @INC, 't/lib';
16 require Test::Simple::Catch;
17 my($out, $err) = Test::Simple::Catch::caught();
18 local $ENV{HARNESS_ACTIVE} = 0;
21 # Can't use Test.pm, that's a 5.005 thing.
27 # Utility testing functions.
29 my($test, $name) = @_;
31 $ok .= "not " unless $test;
32 $ok .= "ok $test_num";
33 $ok .= " - $name" if defined $name;
43 Test::Simple->import(tests => 5);
47 ok( 2, 'passing still' );
48 ok( 3, 'still passing' );
54 My::Test::ok($$out eq <<OUT);
63 My::Test::ok($$err eq <<ERR);
64 # Failed test 'oh no!'
66 # Failed test 'damnit'
68 # Looks like you failed 2 tests of 5.
71 # Prevent Test::Simple from exiting with non zero