tagged release 0.6.4
[parrot.git] / t / steps / auto_gc-05.t
blob28c691fd3a752738fafa4f3bd4bdfb25dcb2f804
1 #! perl
2 # Copyright (C) 2007, The Perl Foundation.
3 # $Id$
4 # auto_gc-05.t
6 use strict;
7 use warnings;
8 use Test::More tests =>   6;
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(
16     {
17         argv => [ q{--gc=malloc} ],
18         mode => q{configure},
19     }
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 );
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 ###################
47 =head1 NAME
49 auto_gc-05.t - test config::auto::gc
51 =head1 SYNOPSIS
53     % prove t/steps/auto_gc-05.t
55 =head1 DESCRIPTION
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.
61 =head1 AUTHOR
63 James E Keenan
65 =head1 SEE ALSO
67 config::auto::gc, F<Configure.pl>.
69 =cut
71 # Local Variables:
72 #   mode: cperl
73 #   cperl-indent-level: 4
74 #   fill-column: 100
75 # End:
76 # vim: expandtab shiftwidth=4: