2 # Copyright (C) 2007, The Perl Foundation.
8 use Test::More tests => 12;
10 use lib qw( lib t/configure/testlib );
11 use_ok('config::init::defaults');
12 use_ok('config::auto::headers');
13 use Parrot::Configure;
14 use Parrot::Configure::Options qw( process_options );
15 use Parrot::Configure::Test qw( test_step_thru_runstep);
16 use IO::CaptureOutput qw | capture |;
18 my $args = process_options(
20 argv => [ q{--verbose} ],
25 my $conf = Parrot::Configure->new;
27 test_step_thru_runstep( $conf, q{init::defaults}, $args );
29 my $pkg = q{auto::headers};
31 $conf->add_steps($pkg);
32 $conf->options->set( %{$args} );
34 my ( $task, $step_name, $step);
35 $task = $conf->steps->[-1];
36 $step_name = $task->step;
38 $step = $step_name->new();
39 ok( defined $step, "$step_name constructor returned defined value" );
40 isa_ok( $step, $step_name );
46 capture ( sub {$rv = $step->runstep($conf) }, \$stdout);
47 ok( $stdout, "verbose output captured" );
48 ok( $rv, "$step_name runstep() returned true value" );
49 is($step->result(), q{}, "Result is empty string as expected");
54 pass("Completed all tests in $0");
56 ################### DOCUMENTATION ###################
60 auto_headers-03.t - test config::auto::headers
66 % prove t/steps/auto_headers-03.t
70 The files in this directory test functionality used by F<Configure.pl>.
72 The tests in this file test config::auto::headers with the C<verbose>
81 config::auto::headers, F<Configure.pl>.
87 # cperl-indent-level: 4
90 # vim: expandtab shiftwidth=4: