fix codetest failure - ASSERT_ARGS does not have a ; after and
[parrot.git] / t / configure / 050-fatal.t
blob8a908744d057c97b5c50cd6e76be13f4f20f823d
1 #! perl
2 # Copyright (C) 2007, Parrot Foundation.
3 # $Id$
4 # 050-fatal.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 );
15 use IO::CaptureOutput qw | capture |;
17 $| = 1;
18 is($|, 1, "output autoflush is set");
20 my ($args, $step_list_ref) = process_options( {
21     argv    => [ q{--fatal} ],
22     mode    => q{configure},
23 } );
24 ok(defined $args, "process_options returned successfully");
25 my %args = %$args;
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");
40     my $rv;
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 ###################
51 =head1 NAME
53 050-fatal.t - see what happens when C<--fatal-step> is set for all configuration steps
55 =head1 SYNOPSIS
57     % prove t/configure/050-fatal.t
59 =head1 DESCRIPTION
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.
66 =head1 AUTHOR
68 James E Keenan
70 =head1 SEE ALSO
72 Parrot::Configure, F<Configure.pl>.
74 =cut
76 # Local Variables:
77 #   mode: cperl
78 #   cperl-indent-level: 4
79 #   fill-column: 100
80 # End:
81 # vim: expandtab shiftwidth=4: