2 # Copyright (C) 2007, The Perl Foundation.
8 use Test::More tests => 8;
9 use lib qw( lib t/configure/testlib );
10 use_ok('config::auto::gc');
11 use Parrot::Configure;
12 use Parrot::Configure::Options qw( process_options );
13 use Parrot::Configure::Test qw( test_step_thru_runstep);
14 use IO::CaptureOutput qw| capture |;
16 my $args = process_options(
18 argv => [ q{--verbose} ],
23 my $conf = Parrot::Configure->new;
25 my $pkg = q{auto::gc};
27 $conf->add_steps($pkg);
28 $conf->options->set( %{$args} );
30 my ( $task, $step_name, $step);
31 $task = $conf->steps->[-1];
32 $step_name = $task->step;
34 $step = $step_name->new();
35 ok( defined $step, "$step_name constructor returned defined value" );
36 isa_ok( $step, $step_name );
37 ok( $step->description(), "$step_name has description" );
42 sub { $ret = $step->runstep($conf); },
45 ok( $ret, "$step_name runstep() returned true value" );
46 like( $stdout, qr/\(gc\)/, "Got expected verbose output");
47 is($conf->data->get('gc_flag'), q{},
48 "Got expected value for 'gc_flag'");
51 pass("Completed all tests in $0");
53 ################### DOCUMENTATION ###################
57 auto_gc-01.t - test config::auto::gc
61 % prove t/steps/auto_gc-01.t
65 The files in this directory test functionality used by F<Configure.pl>.
67 The tests in this file test subroutines exported by config::auto::gc.
75 config::auto::gc, F<Configure.pl>.
81 # cperl-indent-level: 4
84 # vim: expandtab shiftwidth=4: