4 if( $ENV{PERL_CORE} ) {
10 use Test::Builder::Tester tests => 4;
14 # create temporary file handles that still point indirectly
21 tie *$orig_o, "My::Passthru", \*STDOUT;
22 tie *$orig_t, "My::Passthru", \*STDERR;
23 tie *$orig_f, "My::Passthru", \*STDERR;
25 # redirect the file handles to somewhere else for a mo
28 my $t = Test::Builder->new();
31 $t->failure_output($orig_f);
32 $t->todo_output($orig_t);
36 test_out("ok 1 - tested");
38 test_test("standard test okay");
40 # now check that they were restored okay
42 ok($orig_o == $t->output(), "output file reconnected");
43 ok($orig_t == $t->todo_output(), "todo output file reconnected");
44 ok($orig_f == $t->failure_output(), "failure output file reconnected");
46 #####################################################################
52 my $handle = $self->[0];
59 return bless $self, $class;