1BEGIN { 2 if( $ENV{PERL_CORE} ) { 3 chdir 't'; 4 @INC = ('../lib', 'lib'); 5 } 6 else { 7 unshift @INC, 't/lib'; 8 } 9} 10 11use strict; 12 13# Can't use Test.pm, that's a 5.005 thing. 14package My::Test; 15 16print "1..2\n"; 17 18my $test_num = 1; 19# Utility testing functions. 20sub ok ($;$) { 21 my($test, $name) = @_; 22 my $ok = ''; 23 $ok .= "not " unless $test; 24 $ok .= "ok $test_num"; 25 $ok .= " - $name" if defined $name; 26 $ok .= "\n"; 27 print $ok; 28 $test_num++; 29} 30 31 32package main; 33require Test::More; 34 35require Test::Simple::Catch; 36my($out, $err) = Test::Simple::Catch::caught(); 37 38Test::More->import('skip_all'); 39 40 41END { 42 My::Test::ok($$out eq "1..0\n"); 43 My::Test::ok($$err eq ""); 44} 45