2 # $Id: /mirror/googlecode/test-more/t/harness_active.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 use Test::Simple::Catch;
17 my($out, $err) = Test::Simple::Catch::caught();
20 # Can't use Test.pm, that's a 5.005 thing.
23 # This has to be a require or else the END block below runs before
24 # Test::Builder's own and the ending diagnostics don't come out right.
25 require Test::Builder;
26 my $TB = Test::Builder->create;
27 $TB->plan(tests => 4);
29 # Utility testing functions.
35 sub main::err_ok ($) {
39 return $TB->is_eq( $got, $expect );
46 Test::More->import(tests => 4);
47 Test::More->builder->no_ending(1);
50 local $ENV{HARNESS_ACTIVE} = 0;
55 # Failed test 'this fails'
62 # Failed test at $0 line 72.
69 local $ENV{HARNESS_ACTIVE} = 1;
75 # Failed test 'this fails'
84 # Failed test at $0 line 84.