Subject: | not all STDOUT is caught |
Hello brian!
If the &writer prints it catches it fine:
[dmuey@multivac ~]$ perl -MTest::More=tests,1 -MTest::Output -e
'diag("perl v$] Mod v$Test::Output::VERSION");stdout_is(sub {print
"howdy"},"howdy","print()");'
1..1
# perl v5.010000 Mod v1.01
ok 1 - print()
[dmuey@multivac ~]$
If the &writer does system(), the system() output is not caught:
[dmuey@multivac ~]$ perl -MTest::More=tests,1 -MTest::Output -e
'diag("perl v$] Mod v$Test::Output::VERSION");stdout_is(sub
{system("echo howdy")},"howdy","system()");'
1..1
# perl v5.010000 Mod v1.01
howdy
not ok 1 - system()
# Failed test 'system()'
# at -e line 1.
# STDOUT is:
#
# not:
# howdy
# as expected
# Looks like you failed 1 test of 1.
[dmuey@multivac ~]$