Perl Test::More, get stdout
- by Mike
Is there a way inside a Perl test case using Test::More to get the program's stdout
For instance, if I do
use Test::More;
ok(foo());
#in the code I am testing
sub foo() {
print "hello"
}
"hello" will not be visible. I would like to see it.
edit
I know I can use diag(), however this would not work if the print is inside the code I am…