2 # Copyright (C) 2007, Parrot Foundation.
4 # 037-run_single_step.t
9 use Test::More tests => 5;
11 use lib qw( lib t/configure/testlib );
12 use Parrot::Configure;
13 use Parrot::Configure::Options qw( process_options );
14 use IO::CaptureOutput qw | capture |;
16 my ($args, $step_list_ref) = process_options(
22 ok( defined $args, "process_options returned successfully" );
25 my $conf = Parrot::Configure->new;
26 ok( defined $conf, "Parrot::Configure->new() returned okay" );
28 my $step = q{init::defaults};
29 $conf->add_step($step);
30 $conf->options->set( %{$args} );
34 capture ( sub { eval { $conf->run_single_step($step); } }, \$stdout );
35 ok( !$@, "run_single_step() completed without error" );
38 # qr/$step.*done./s, #'
39 # qr/Setting up Configure's default values/s, #'
40 qr/Set Configure's default values/s, #'
41 "Got message expected upon running $step"
45 pass("Completed all tests in $0");
47 ################### DOCUMENTATION ###################
51 037-run_single_step.t - test C<run_single_step()> during configuration
55 % prove t/configure/037-run_single_step.t
59 The files in this directory test functionality used by F<Configure.pl>.
61 The tests in this file examine what would happen if
62 C<Parrot::Configure::run_single_step()> were run during configuration.
63 This is not its typical or recommended use. It is more typically called
64 post-configuration by F<tools/dev/reconfigure.pl>.
72 Parrot::Configure, F<Configure.pl>.
78 # cperl-indent-level: 4
81 # vim: expandtab shiftwidth=4: