parrotcode: subroutines used in F<t/configure/*> tests | |
Contents | Perl Modules |
Parrot::Configure::Test - subroutines used in t/configure/* tests
use lib qw( lib );
use Parrot::Configure::Test qw( test_step_thru_runstep );
Set-up for test_step_thru_runstep()
:
$parrot_version = Parrot::BuildUtil::parrot_version();
$args = process_options( {
argv => [ ],
script => $0,
parrot_version => $parrot_version,
svnid => '$Id$',
} );
$conf = Parrot::Configure->new;
test_step_thru_runstep($conf, q{init::defaults}, $args);
The subroutines in this package are used to simplify tests found in t/configure/. Any subroutine in this package should be functional (i.e.
, not object-oriented), be exported only on demand and have all its arguments explicitly passed as arguments.
test_step_thru_runstep()
Reduce code repeated in many test files in the t/configure/101+ series. Execution of certain configuration steps depends upon successful execution of some (though not necessarily all) of the preceding configuration steps. Hence, unit tests of the packages generating certain steps may require execution of preceding steps in the test file. Once you determine that you need to execute one step as a prerequisite to another, you can provide that step as an argument to test_step_thru_runstep()
and not worry about it further.
List of three arguments:
Parrot::Configure::Options::process_options()
.Returns the step number, but currently this is not used and needs further exploration.
Each invocation of test_step_thru_runstep()
runs 4 Test::More tests.
David H Adler and James E Keenan
|