2 # Copyright (C) 2007, The Perl Foundation.
8 use Test::More tests => 6;
11 use_ok('config::init::defaults');
12 use Parrot::Configure;
13 use Parrot::Configure::Options qw( process_options );
15 my $pkg = q{init::defaults};
16 my $args = process_options(
18 argv => [ q{--debugging=0}, q{--profile}, q{--m=32} ],
20 # These 3 options are non-default and inside
21 # init::defaults::runsteps() they create what, from a
22 # testing coverage perspective, create branches or
23 # conditions. The regular run of Configure.pl during
24 # coverage analysis will cover the default
25 # branches/conditions. Hence, we supply the
26 # non-default options here to increase coverage.
31 my $conf = Parrot::Configure->new;
32 $conf->add_steps($pkg);
33 $conf->options->set( %{$args} );
35 my $task = $conf->steps->[-1];
36 my $step_name = $task->step;
38 my $step = $step_name->new();
39 ok( defined $step, "$step_name constructor returned defined value" );
40 isa_ok( $step, $step_name );
41 ok( $step->description(), "$step_name has description" );
42 my $ret = $step->runstep($conf);
43 ok( defined $ret, "$step_name runstep() returned defined value" );
45 # RT#44451: Write a SKIP block which will test the one OS-specific branch in
48 pass("Completed all tests in $0");
50 ################### DOCUMENTATION ###################
54 init_defaults-01.t - test config::init::defaults
58 % prove t/steps/init_defaults-01.t
62 The files in this directory test functionality used by F<Configure.pl>.
64 The tests in this file test subroutines exported by config::init::defaults.
72 config::init::defaults, F<Configure.pl>.
78 # cperl-indent-level: 4
81 # vim: expandtab shiftwidth=4: