tagged release 0.6.4
[parrot.git] / t / steps / auto_gc-03.t
blob8f99e41e41c6f0a393408bf463dfe823e5c25e38
1 #! perl
2 # Copyright (C) 2007, The Perl Foundation.
3 # $Id$
4 # auto_gc-03.t
6 use strict;
7 use warnings;
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(
16     {
17         argv => [ q{--gc=libc} ],
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 $conf->data->set('i_malloc' => 1);
39 my $ret = $step->runstep($conf);
40 ok( $ret, "$step_name runstep() returned true value" );
41 is($conf->data->get('gc_flag'), '-DGC_IS_MALLOC',
42     "Got expected value for 'gc_flag'");
43 is($conf->data->get('malloc_header'), 'malloc.h',
44     "Got expected value for 'malloc_header'");
46 pass("Completed all tests in $0");
48 ################### DOCUMENTATION ###################
50 =head1 NAME
52 auto_gc-03.t - test config::auto::gc
54 =head1 SYNOPSIS
56     % prove t/steps/auto_gc-03.t
58 =head1 DESCRIPTION
60 The files in this directory test functionality used by F<Configure.pl>.
62 The tests in this file test subroutines exported by config::auto::gc.
64 =head1 AUTHOR
66 James E Keenan
68 =head1 SEE ALSO
70 config::auto::gc, F<Configure.pl>.
72 =cut
74 # Local Variables:
75 #   mode: cperl
76 #   cperl-indent-level: 4
77 #   fill-column: 100
78 # End:
79 # vim: expandtab shiftwidth=4: