tagged release 0.6.4
[parrot.git] / t / steps / init_defaults-01.t
blobf496a7fce56fc9d3bc462b0a3af89077813fb149
1 #! perl
2 # Copyright (C) 2007, The Perl Foundation.
3 # $Id$
4 # init_defaults-01.t
6 use strict;
7 use warnings;
8 use Test::More tests => 6;
9 use Carp;
10 use lib qw( lib );
11 use_ok('config::init::defaults');
12 use Parrot::Configure;
13 use Parrot::Configure::Options qw( process_options );
15 my $pkg  = q{init::defaults};
16 my $args = process_options(
17     {
18         argv => [ q{--debugging=0}, q{--profile}, q{--m=32} ],
20         # These 3 options are non-default and inside
21         # init::defaults::runsteps() they create what, from a
22         # testing coverage perspective, create branches or
23         # conditions.  The regular run of Configure.pl during
24         # coverage analysis will cover the default
25         # branches/conditions.  Hence, we supply the
26         # non-default options here to increase coverage.
27         mode => q{configure},
28     }
31 my $conf = Parrot::Configure->new;
32 $conf->add_steps($pkg);
33 $conf->options->set( %{$args} );
35 my $task        = $conf->steps->[-1];
36 my $step_name   = $task->step;
38 my $step = $step_name->new();
39 ok( defined $step, "$step_name constructor returned defined value" );
40 isa_ok( $step, $step_name );
41 ok( $step->description(), "$step_name has description" );
42 my $ret = $step->runstep($conf);
43 ok( defined $ret, "$step_name runstep() returned defined value" );
45 # RT#44451:  Write a SKIP block which will test the one OS-specific branch in
46 # init::defaults.
48 pass("Completed all tests in $0");
50 ################### DOCUMENTATION ###################
52 =head1 NAME
54 init_defaults-01.t - test config::init::defaults
56 =head1 SYNOPSIS
58     % prove t/steps/init_defaults-01.t
60 =head1 DESCRIPTION
62 The files in this directory test functionality used by F<Configure.pl>.
64 The tests in this file test subroutines exported by config::init::defaults.
66 =head1 AUTHOR
68 James E Keenan
70 =head1 SEE ALSO
72 config::init::defaults, F<Configure.pl>.
74 =cut
76 # Local Variables:
77 #   mode: cperl
78 #   cperl-indent-level: 4
79 #   fill-column: 100
80 # End:
81 # vim: expandtab shiftwidth=4: