2 # Copyright (C) 2007, The Perl Foundation.
8 use Test::More tests => 7;
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);
15 my $args = process_options(
17 argv => [ q{--gc=malloc-trace} ],
22 my $conf = Parrot::Configure->new;
24 my $pkg = q{auto::gc};
26 $conf->add_steps($pkg);
27 $conf->options->set( %{$args} );
29 my ( $task, $step_name, $step);
30 $task = $conf->steps->[-1];
31 $step_name = $task->step;
33 $step = $step_name->new();
34 ok( defined $step, "$step_name constructor returned defined value" );
35 isa_ok( $step, $step_name );
36 ok( $step->description(), "$step_name has description" );
38 my $ret = $step->runstep($conf);
39 ok( $ret, "$step_name runstep() returned true value" );
40 is($conf->data->get('gc_flag'), '-DGC_IS_MALLOC',
41 "Got expected value for 'gc_flag'");
43 pass("Completed all tests in $0");
45 ################### DOCUMENTATION ###################
49 auto_gc-06.t - test config::auto::gc
53 % prove t/steps/auto_gc-06.t
57 The files in this directory test functionality used by F<Configure.pl>.
59 The tests in this file test subroutines exported by config::auto::gc.
67 config::auto::gc, F<Configure.pl>.
73 # cperl-indent-level: 4
76 # vim: expandtab shiftwidth=4: