Add the original source packages to maemo, source lenny
[dh-make-perl] / dev / i386 / libtest-simple-perl / libtest-simple-perl-0.80 / t / lib / Test / Simple / Catch.pm
diff --git a/dev/i386/libtest-simple-perl/libtest-simple-perl-0.80/t/lib/Test/Simple/Catch.pm b/dev/i386/libtest-simple-perl/libtest-simple-perl-0.80/t/lib/Test/Simple/Catch.pm
new file mode 100644 (file)
index 0000000..441a125
--- /dev/null
@@ -0,0 +1,18 @@
+# For testing Test::Simple;
+package Test::Simple::Catch;
+
+use Symbol;
+use TieOut;
+my($out_fh, $err_fh) = (gensym, gensym);
+my $out = tie *$out_fh, 'TieOut';
+my $err = tie *$err_fh, 'TieOut';
+
+use Test::Builder;
+my $t = Test::Builder->new;
+$t->output($out_fh);
+$t->failure_output($err_fh);
+$t->todo_output($err_fh);
+
+sub caught { return($out, $err) }
+
+1;