Tagging trunk at r29452 so that the noautopack can later be synched to it.
[parrot.git] / t / steps / auto_warnings-07.t
blobd6e3da0c82c0729f57dab66189a940c55da3b655
1 #! perl
2 # Copyright (C) 2007, The Perl Foundation.
3 # $Id$
4 # auto_warnings-07.t
6 use strict;
7 use warnings;
8 use Test::More tests =>  21;
9 use Carp;
10 use lib qw( lib t/configure/testlib );
11 use_ok('config::init::defaults');
12 use_ok('config::init::hints');
13 use_ok('config::inter::progs');
14 use_ok('config::auto::warnings');
15 use Parrot::Configure;
16 use Parrot::Configure::Options qw( process_options );
17 use Parrot::Configure::Test qw( test_step_thru_runstep);
19 my $args = process_options(
20     {
21         argv => [ ],
22         mode => q{configure},
23     }
26 my $conf = Parrot::Configure->new;
28 test_step_thru_runstep( $conf, q{init::defaults}, $args );
29 test_step_thru_runstep( $conf, q{init::hints}, $args );
30 test_step_thru_runstep( $conf, q{inter::progs}, $args );
32 my $pkg = q{auto::warnings};
34 $conf->add_steps($pkg);
35 $conf->options->set( %{$args} );
37 my ( $task, $step_name, $step);
38 $task        = $conf->steps->[-1];
39 $step_name   = $task->step;
41 $step = $step_name->new();
42 ok( defined $step, "$step_name constructor returned defined value" );
43 isa_ok( $step, $step_name );
46 # Mock case where C compiler is not gcc.
47 $conf->data->set( gccversion => undef );
48 ok($step->runstep($conf), "runstep() returned true value");
49 is($step->result(), q{skipped}, "Got expected result");
51 pass("Completed all tests in $0");
53 ################### DOCUMENTATION ###################
55 =head1 NAME
57 auto_warnings-07.t - test config::auto::warnings
59 =head1 SYNOPSIS
61     % prove t/steps/auto_warnings-07.t
63 =head1 DESCRIPTION
65 The files in this directory test functionality used by F<Configure.pl>.
67 The tests in this file test config::auto::warnings when the C compiler
68 being used is not I<gcc>.
70 =head1 AUTHOR
72 James E Keenan
74 =head1 SEE ALSO
76 config::auto::warnings, F<Configure.pl>.
78 =cut
80 # Local Variables:
81 #   mode: cperl
82 #   cperl-indent-level: 4
83 #   fill-column: 100
84 # End:
85 # vim: expandtab shiftwidth=4: