fix codetest failure - ASSERT_ARGS does not have a ; after and
[parrot.git] / t / configure / 042-list_of_steps.t
blob3d738a8e1912b4f9f90c7363fc5cb30220364354
1 #! perl
2 # Copyright (C) 2007, Parrot Foundation.
3 # $Id$
4 # 042-list_of_steps.t
6 use strict;
7 use warnings;
9 use Test::More tests =>  6;
10 use Carp;
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( {
17     argv    => [ ],
18     mode    => q{configure},
19 } );
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();
28 eval {
29     $conf->get_list_of_steps();
31 like ($@,
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 ###################
49 =head1 NAME
51 042-list_of_steps.t - test C<Parrot::Configure::get_list_of_steps()>
53 =head1 SYNOPSIS
55     % prove t/configure/042-list_of_steps.t
57 =head1 DESCRIPTION
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()>.
63 =head1 AUTHOR
65 James E Keenan
67 =head1 SEE ALSO
69 Parrot::Configure, F<Configure.pl>.
71 =cut
73 # Local Variables:
74 #   mode: cperl
75 #   cperl-indent-level: 4
76 #   fill-column: 100
77 # End:
78 # vim: expandtab shiftwidth=4: