in reply to Testing a module's stdout/stderr
... or you could use my Test::Trap. :)
use Test::More tests => 1; use Test::Trap; trap { print 'gabba gabba hey'; }; ok($trap->stdout eq 'gabba gabba hey') || diag "didn't print 'gabba gabba hey' to stdout.";
Edit: On second thought, $trap->stdout_is('gabba gabba hey') may be more than you want. The good news is that ->stdout, as above, gives you all you were asking for.
print "Just another Perl ${\(trickster and hacker)},"
The Sidhekin proves Sidhe did it!
|
|---|