sync a bunch of files with Test::Simple 0.86
[p5sagit/p5-mst-13.2.git] / t / lib / Test / Simple / Catch.pm
CommitLineData
4dd974da 1# For testing Test::Simple;
3c4bf434 2# $Id$
d020a79a 3package Test::Simple::Catch;
4dd974da 4
33459055 5use Symbol;
30e302f8 6use TieOut;
717da8a4 7my( $out_fh, $err_fh ) = ( gensym, gensym );
30e302f8 8my $out = tie *$out_fh, 'TieOut';
9my $err = tie *$err_fh, 'TieOut';
4dd974da 10
33459055 11use Test::Builder;
12my $t = Test::Builder->new;
13$t->output($out_fh);
14$t->failure_output($err_fh);
15$t->todo_output($err_fh);
4dd974da 16
717da8a4 17sub caught { return( $out, $err ) }
4dd974da 18
4dd974da 191;