NAME ^

107-inter_progs-01.t - test config::inter::progs

SYNOPSIS ^

    % prove t/configure/107-inter_progs-01.t

DESCRIPTION ^

The files in this directory test functionality used by Configure.pl.

The tests in this file test subroutines exported by config::inter::progs.

BUG ^

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.

AUTHOR ^

James E Keenan

SEE ALSO ^

config::inter::progs, Configure.pl.


parrot