1BEGIN { 2 if( $ENV{PERL_CORE} ) { 3 chdir 't'; 4 @INC = ('../lib', 'lib'); 5 } 6 else { 7 unshift @INC, 't/lib/'; 8 } 9} 10chdir 't'; 11 12use Filter::Simple::FilterOnlyTest qr/not ok/ => "ok", 13 "bad" => "ok", fail => "die"; 14print "1..9\n"; 15 16sub fail { print "ok ", $_[0], "\n" } 17sub ok { print "ok ", $_[0], "\n" } 18 19print "not ok 1\n"; 20print "bad 2\n"; 21 22fail(3); 23&fail(4); 24 25print "not " unless "whatnot okapi" eq "whatokapi"; 26print "ok 5\n"; 27 28ok 7 unless not ok 6; 29 30no Filter::Simple::FilterOnlyTest; # THE FUN STOPS HERE 31 32print "not " unless "not ok" =~ /^not /; 33print "ok 8\n"; 34 35print "not " unless "bad" =~ /bad/; 36print "ok 9\n"; 37