parrotcode: test config::inter::progs | |
Contents | Tests |
107-inter_progs.04.t - test config::inter::progs
% prove t/configure/107-inter_progs.04.t
The files in this directory test functionality used by Configure.pl.
The tests in this file test subroutines exported by config::inter::progs.
This file tests the case where the --ask
option is specified and, hence, the user must respond to a prompt. The response to the prompt is supplied automatically via Tie::Filehandle::Preempt::Stdin. But that response is made via STDOUT
. A user generally would not like to see that output when running this test, say, via prove -v
. So the data written to STDOUT
must be captured rather than displayed.
In other test files we can do that with Parrot::IO::Capture::Mini. We cannot do that here because there is extensive manipulation of STDOUT
deep inside the code being tested. The solution employed in this test successfully disposes of information printed to STDOUT
, but it confuses Test::Harness's count of tests run. This would cause the file as a whole to be reported as having failed, when in fact every single test passed. As a compromise, we run the file with no_plan
.
James E Keenan
config::inter::progs, Configure.pl.
|