2 # Copyright (C) 2007, Parrot Foundation.
9 use Test::More tests => 6;
11 use lib qw( lib t/configure/testlib );
12 use Parrot::Configure;
13 use Parrot::Configure::Options qw( process_options );
14 use Parrot::Configure::Step::List qw( get_steps_list );
16 my ($args, $step_list_ref) = process_options( {
20 ok(defined $args, "process_options returned successfully");
22 my $conf = Parrot::Configure->new;
23 ok(defined $conf, "Parrot::Configure->new() returned okay");
25 my $first_step = q{init::zeta};
26 my @official_steps = get_steps_list();
29 $conf->get_list_of_steps();
32 qr/^list_of_steps not available until steps have been added/,
33 "Got expected failure message when get_list_of_steps called too early"
36 $conf->add_steps( $first_step, @official_steps );
37 my @list_of_steps = $conf->get_list_of_steps();
38 is_deeply( [ ( $first_step, @official_steps ) ], [ @list_of_steps ],
39 "get_steps_list() and get_list_of_steps() returned same step names");
41 my $steps_ref = $conf->get_list_of_steps();
42 is_deeply( [ ( $first_step, @official_steps ) ], $steps_ref,
43 "get_steps_list() and get_list_of_steps() returned same step names");
45 pass("Completed all tests in $0");
47 ################### DOCUMENTATION ###################
51 042-list_of_steps.t - test C<Parrot::Configure::get_list_of_steps()>
55 % prove t/configure/042-list_of_steps.t
59 The files in this directory test functionality used by F<Configure.pl>.
61 The tests in this file C<Parrot::Configure::get_list_of_steps()>.
69 Parrot::Configure, F<Configure.pl>.
75 # cperl-indent-level: 4
78 # vim: expandtab shiftwidth=4: