4 if( $ENV{PERL_CORE} ) {
6 @INC = ('../lib', 'lib');
15 require Test::Simple::Catch;
16 my($out, $err) = Test::Simple::Catch::caught();
19 # Can't use Test.pm, that's a 5.005 thing.
25 # Utility testing functions.
27 my($test, $name) = @_;
29 $ok .= "not " unless $test;
30 $ok .= "ok $test_num";
31 $ok .= " - $name" if defined $name;
41 Test::Simple->import(tests => 5);
45 ok( 2, 'passing still' );
46 ok( 3, 'still passing' );
52 My::Test::ok($$out eq <<OUT);
61 My::Test::ok($$err eq <<ERR);
62 # Failed test ($0 at line 38)
63 # Failed test ($0 at line 39)
64 # Looks like you failed 2 tests of 5.
67 # Prevent Test::Simple from exiting with non zero