3 use Test::Builder::Tester tests => 4;
7 # create temporary file handles that still point indirectly
14 tie *$orig_o, "My::Passthru", \*STDOUT;
15 tie *$orig_t, "My::Passthru", \*STDERR;
16 tie *$orig_f, "My::Passthru", \*STDERR;
18 # redirect the file handles to somewhere else for a mo
21 my $t = Test::Builder->new();
24 $t->failure_output($orig_f);
25 $t->todo_output($orig_t);
29 test_out("ok 1 - tested");
31 test_test("standard test okay");
33 # now check that they were restored okay
35 ok($orig_o == $t->output(), "output file reconnected");
36 ok($orig_t == $t->todo_output(), "todo output file reconnected");
37 ok($orig_f == $t->failure_output(), "failure output file reconnected");
39 #####################################################################
45 my $handle = $self->[0];
52 return bless $self, $class;