1# For testing Test::Simple;
2package Test::Simple::Catch;
3
4use Symbol;
5use TieOut;
6my($out_fh, $err_fh) = (gensym, gensym);
7my $out = tie *$out_fh, 'TieOut';
8my $err = tie *$err_fh, 'TieOut';
9
10use Test::Builder;
11my $t = Test::Builder->new;
12$t->output($out_fh);
13$t->failure_output($err_fh);
14$t->todo_output($err_fh);
15
16sub caught { return($out, $err) }
17
181;
19