Author: jkeenan
Date: Thu Oct 4 18:47:48 2007
New Revision: 21859
Added:
branches/reconfigure/t/configure/051-list_of_steps.t (contents, props
changed)
Modified:
branches/reconfigure/t/configure/050-fatal_step.t
Log:
New file holding tests for Parrot::Configure::get_list_of_steps(). Also, small
POD correction in 050.
Modified: branches/reconfigure/t/configure/050-fatal_step.t
==============================================================================
--- branches/reconfigure/t/configure/050-fatal_step.t (original)
+++ branches/reconfigure/t/configure/050-fatal_step.t Thu Oct 4 18:47:48 2007
@@ -69,9 +69,8 @@
The files in this directory test functionality used by F<Configure.pl>.
-The tests in this file examine what happens when your configuration step
-module returns something other than the object but has some other defined
-result method.
+The tests in this file examine what happens when you require the failure of
+any configuration step to cause all configuration to cease.
=head1 AUTHOR
Added: branches/reconfigure/t/configure/051-list_of_steps.t
==============================================================================
--- (empty file)
+++ branches/reconfigure/t/configure/051-list_of_steps.t Thu Oct 4
18:47:48 2007
@@ -0,0 +1,71 @@
+#! perl
+# Copyright (C) 2007, The Perl Foundation.
+# $Id$
+# 051-list_of_steps.t
+
+use strict;
+use warnings;
+
+use Test::More tests => 5;
+use Carp;
+use lib qw( lib t/configure/testlib );
+use Parrot::Configure;
+use Parrot::Configure::Options qw( process_options );
+use Parrot::Configure::Step::List qw( get_steps_list );
+
+my $args = process_options( {
+ argv => [ ],
+ mode => q{configure},
+} );
+ok(defined $args, "process_options returned successfully");
+my %args = %$args;
+
+my $conf = Parrot::Configure->new;
+ok(defined $conf, "Parrot::Configure->new() returned okay");
+
+my $first_step = q{init::zeta};
+
+my @official_steps = get_steps_list();
+$conf->add_steps( $first_step, @official_steps );
+my @list_of_steps = $conf->get_list_of_steps();
+is_deeply( [ ( $first_step, @official_steps ) ], [ @list_of_steps ],
+ "get_steps_list() and get_list_of_steps() returned same step names");
+
+my $steps_ref = $conf->get_list_of_steps();
+is_deeply( [ ( $first_step, @official_steps ) ], $steps_ref,
+ "get_steps_list() and get_list_of_steps() returned same step names");
+
+pass("Completed all tests in $0");
+
+################### DOCUMENTATION ###################
+
+=head1 NAME
+
+051-list_of_steps.t - test C<Parrot::Configure::get_list_of_steps()>
+
+=head1 SYNOPSIS
+
+ % prove t/configure/051-list_of_steps.t
+
+=head1 DESCRIPTION
+
+The files in this directory test functionality used by F<Configure.pl>.
+
+The tests in this file C<Parrot::Configure::get_list_of_steps()>.
+
+=head1 AUTHOR
+
+James E Keenan
+
+=head1 SEE ALSO
+
+Parrot::Configure, F<Configure.pl>.
+
+=cut
+
+# Local Variables:
+# mode: cperl
+# cperl-indent-level: 4
+# fill-column: 100
+# End:
+# vim: expandtab shiftwidth=4: