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