2 # Copyright (C) 2007, The Perl Foundation.
8 use Test::More tests => 12;
10 use lib qw( lib t/configure/testlib );
11 use_ok('config::init::defaults');
12 use_ok('config::init::optimize');
13 use Parrot::Configure;
14 use Parrot::Configure::Options qw( process_options );
15 use Parrot::Configure::Test qw( test_step_thru_runstep);
17 my $args = process_options(
19 argv => [q{--optimize}],
24 my $conf = Parrot::Configure->new();
26 test_step_thru_runstep( $conf, q{init::defaults}, $args );
28 my ( $task, $step_name, $step, $ret );
29 my $pkg = q{init::optimize};
31 $conf->add_steps($pkg);
32 $conf->options->set( %{$args} );
33 $task = $conf->steps->[1];
34 $step_name = $task->step;
36 $step = $step_name->new();
37 ok( defined $step, "$step_name constructor returned defined value" );
38 isa_ok( $step, $step_name );
39 ok( $step->description(), "$step_name has description" );
41 $ret = $step->runstep($conf);
42 ok( defined $ret, "$step_name runstep() returned defined value" );
44 pass("Keep Devel::Cover happy");
45 pass("Completed all tests in $0");
47 ################### DOCUMENTATION ###################
51 init_optimize-02.t - test config::init::optimize
55 % prove t/steps/init_optimize-02.t
59 The files in this directory test functionality used by F<Configure.pl>.
61 The tests in this file test subroutines exported by config::init::optimize.
69 config::init::optimize, F<Configure.pl>.
75 # cperl-indent-level: 4
78 # vim: expandtab shiftwidth=4: