NAME

Parrot::Configure::Test - subroutines used in t/configure/* tests

SYNOPSIS

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: Test.pm 20408 2007-08-01 21:27:39Z paultcochrane $',
} );

$conf = Parrot::Configure->new;
test_step_thru_runstep($conf, q{init::defaults}, $args);

DESCRIPTION

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.

FUNCTIONS

test_step_thru_runstep()

  • Purpose

    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.

  • Arguments

    List of three arguments:

    • Parrot::Configure object

    • string holding the name of the step to be run

    • hash reference which is the output of Parrot::Configure::Options::process_options().

  • Return Value

    Returns the step number, but currently this is not used and needs further exploration.

  • Comment

    Each invocation of test_step_thru_runstep() runs 4 Test::More tests.

AUTHORS

David H Adler and James E Keenan

SEE ALSO

Configure.pl.