tagged release 0.6.4
[parrot.git] / t / steps / gen_config_pm-01.t
blob89ac8315a514be28a35104f5dc277dae79dc4ffd
1 #! perl
2 # Copyright (C) 2007, The Perl Foundation.
3 # $Id$
4 # gen_config_pm-01.t
6 use strict;
7 use warnings;
8 use Test::More tests =>  10;
9 use Carp;
10 use lib qw( lib t/configure/testlib );
11 use_ok('config::init::defaults');
12 use_ok('config::gen::config_pm');
13 use Parrot::Configure;
14 use Parrot::Configure::Options qw( process_options );
15 use Parrot::Configure::Test qw( test_step_thru_runstep);
17 my $args = process_options( {
18     argv            => [],
19     mode            => q{configure},
20 } );
22 my $conf = Parrot::Configure->new();
24 test_step_thru_runstep($conf, q{init::defaults}, $args);
26 my ($task, $step_name, $step, $ret);
27 my $pkg = q{gen::config_pm};
29 $conf->add_steps($pkg);
30 $conf->options->set(%{$args});
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");
39 # Test of runstep() not yet ready for prime time.
40 # ok($step->runstep($conf), "runstep() returned true value");
43 pass("Completed all tests in $0");
45 ################### DOCUMENTATION ###################
47 =head1 NAME
49 gen_config_pm-01.t - test config::gen::config_pm
51 =head1 SYNOPSIS
53     % prove t/steps/gen_config_pm-01.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::gen::config_pm.
61 =head1 AUTHOR
63 James E Keenan
65 =head1 SEE ALSO
67 config::gen::config_pm, 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: