Tagging trunk at r29452 so that the noautopack can later be synched to it.
[parrot.git] / t / steps / auto_headers-03.t
blob37462a3e1355217e5fcb2f664559cad748a8c649
1 #! perl
2 # Copyright (C) 2007, The Perl Foundation.
3 # $Id$
4 # auto_headers-03.t
6 use strict;
7 use warnings;
8 use Test::More tests =>  12;
9 use Carp;
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(
19     {
20         argv => [ q{--verbose} ],
21         mode => q{configure},
22     }
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 );
44     my $rv;
45     my $stdout;
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 ###################
58 =head1 NAME
60 auto_headers-03.t - test config::auto::headers
64 =head1 SYNOPSIS
66     % prove t/steps/auto_headers-03.t
68 =head1 DESCRIPTION
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>
73 option set.
75 =head1 AUTHOR
77 James E Keenan
79 =head1 SEE ALSO
81 config::auto::headers, F<Configure.pl>.
83 =cut
85 # Local Variables:
86 #   mode: cperl
87 #   cperl-indent-level: 4
88 #   fill-column: 100
89 # End:
90 # vim: expandtab shiftwidth=4: