2 # Copyright (C) 2007, The Perl Foundation.
8 use Test::More tests => 21;
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(
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 ###################
57 auto_warnings-07.t - test config::auto::warnings
61 % prove t/steps/auto_warnings-07.t
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>.
76 config::auto::warnings, F<Configure.pl>.
82 # cperl-indent-level: 4
85 # vim: expandtab shiftwidth=4: