tagged release 0.6.4
[parrot.git] / t / configure / 038-run_single_step.t
blob53f3a30ce64fced67875605f0a210ebb99ca71ef
1 #! perl
2 # Copyright (C) 2007, The Perl Foundation.
3 # $Id$
4 # 038-run_single_step.t
6 use strict;
7 use warnings;
9 use Test::More tests => 4;
10 use Carp;
11 use lib qw( lib );
12 use Parrot::Configure;
13 use Parrot::Configure::Options qw( process_options );
15 my $args = process_options(
16     {
17         argv => [],
18         mode => q{configure},
19     }
21 ok( defined $args, "process_options returned successfully" );
22 my %args = %$args;
24 my $conf = Parrot::Configure->new;
25 ok( defined $conf, "Parrot::Configure->new() returned okay" );
27 my $step = q{phony::step};
28 $conf->add_step($step);
29 $conf->options->set( %{$args} );
31 eval { $conf->run_single_step($step); };
32 like( $@, qr/Can't locate phony\/step\.pm in \@INC/, "Got expected error message" );
34 pass("Completed all tests in $0");
36 ################### DOCUMENTATION ###################
38 =head1 NAME
40 038-run_single_step.t - test C<run_single_step()> during configuration
42 =head1 SYNOPSIS
44     % prove t/configure/038-run_single_step.t
46 =head1 DESCRIPTION
48 The files in this directory test functionality used by F<Configure.pl>.
50 The tests in this file examine what would happen if
51 C<Parrot::Configure::run_single_step()> were run during configuration.
52 This is not its typical or recommended use.  It is more typically called
53 post-configuration by F<tools/dev/reconfigure.pl>.
55 =head1 AUTHOR
57 James E Keenan
59 =head1 SEE ALSO
61 Parrot::Configure, F<Configure.pl>.
63 =cut
65 # Local Variables:
66 #   mode: cperl
67 #   cperl-indent-level: 4
68 #   fill-column: 100
69 # End:
70 # vim: expandtab shiftwidth=4: