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::inter::lex');
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(
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{inter::lex};
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" );
40 $ret = $step->runstep($conf);
41 ok( defined $ret, "$step_name runstep() returned defined value" );
42 is( $step->result(), q{skipped}, "Step was skipped as expected; no '--maintainer' option" );
44 pass("Completed all tests in $0");
46 ################### DOCUMENTATION ###################
50 inter_lex-01.t - test config::inter::lex
54 % prove t/steps/inter_lex-01.t
58 The files in this directory test functionality used by F<Configure.pl>.
60 The tests in this file test subroutines exported by config::inter::lex. In
61 this case, only the C<--ask> option is provided. Because the C<--maintainer>
62 option is not provided, the step is skipped and no prompt is ever reached.
70 config::inter::lex, F<Configure.pl>.
76 # cperl-indent-level: 4
79 # vim: expandtab shiftwidth=4: