2 # Copyright (C) 2007, The Perl Foundation.
8 use Test::More tests => 20;
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 my %potential_warnings_seen;
47 $conf->options->set(maintainer => 1);
48 $step->_add_maintainer_warnings($conf);
49 %potential_warnings_seen = map { $_, 1 } @{ $step->{potential_warnings} };
50 ok($potential_warnings_seen{'-Wlarger-than-4096'}, "Maintainer warning added");
53 pass("Completed all tests in $0");
55 ################### DOCUMENTATION ###################
59 auto_warnings-02.t - test config::auto::warnings
63 % prove t/steps/auto_warnings-02.t
67 The files in this directory test functionality used by F<Configure.pl>.
69 The tests in this file test aspects of config::auto::warnings.
77 config::auto::warnings, F<Configure.pl>.
83 # cperl-indent-level: 4
86 # vim: expandtab shiftwidth=4: