2 if( $ENV{PERL_CORE} ) {
4 @INC = ('../lib', 'lib');
11 # Can't use Test.pm, that's a 5.005 thing.
15 if( !$ENV{HARNESS_ACTIVE} && $ENV{PERL_CORE} ) {
16 print "1..0 # Skipped: Won't work with t/TEST\n";
20 # This feature requires a fairly new version of Test::Harness
21 require Test::Harness;
22 if( $Test::Harness::VERSION < 1.20 ) {
23 print "1..0 # Skipped: Need Test::Harness 1.20 or up\n";
31 # Utility testing functions.
33 my($test, $name) = @_;
35 $ok .= "not " unless $test;
36 $ok .= "ok $test_num";
37 $ok .= " - $name" if defined $name;
48 require Test::Simple::Catch;
49 my($out, $err) = Test::Simple::Catch::caught();
52 Test::Simple->import('no_plan');
58 My::Test::ok($$out eq <<OUT);
63 My::Test::ok($$err eq <<ERR);
66 # Prevent Test::Simple from exiting with non zero