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 );
15 use IO::CaptureOutput qw | capture |;
18 is($|, 1, "output autoflush is set");
20 my ($args, $step_list_ref) = process_options( {
21 argv => [ q{--fatal} ],
24 ok(defined $args, "process_options returned successfully");
27 my $conf = Parrot::Configure->new;
28 ok(defined $conf, "Parrot::Configure->new() returned okay");
30 my $first_step = q{init::zeta};
31 my $description = 'Determining if your computer does zeta';
33 $conf->add_steps( $first_step, get_steps_list() );
35 $conf->options->set(%args);
36 is($conf->options->{c}->{debugging}, 1,
37 "command-line option '--debugging' has been stored in object");
41 my ($stdout, $stderr);
42 capture ( sub {$rv = $conf->runsteps}, \$stdout, \$stderr );
44 ok(! defined $rv, "runsteps returned undefined value as expected");
47 pass("Completed all tests in $0");
49 ################### DOCUMENTATION ###################
53 050-fatal.t - see what happens when C<--fatal-step> is set for all configuration steps
57 % prove t/configure/050-fatal.t
61 The files in this directory test functionality used by F<Configure.pl>.
63 The tests in this file examine what happens when you require the failure of
64 any configuration step to cause all configuration to cease.
72 Parrot::Configure, F<Configure.pl>.
78 # cperl-indent-level: 4
81 # vim: expandtab shiftwidth=4: