tagged release 0.6.4
[parrot.git] / t / steps / auto_fink-01.t
blob632d1809d9a733afb4d5ed6e78faccf3dfec1e70
1 #! perl
2 # Copyright (C) 2007, The Perl Foundation.
3 # $Id$
4 # auto_fink-01.t
6 use strict;
7 use warnings;
8 use Test::More;
9 plan( skip_all => 'Fink is Darwin only' ) unless $^O =~ /darwin/;
10 plan( tests => 11 );
11 use Carp;
12 use lib qw( lib t/configure/testlib );
13 use_ok('config::init::defaults');
14 use_ok('config::auto::fink');
16 use Parrot::Configure;
17 use Parrot::Configure::Options qw( process_options );
18 use Parrot::Configure::Test qw( test_step_thru_runstep);
20 my $args = process_options( {
21     argv            => [],
22     mode            => q{configure},
23 } );
25 my $conf = Parrot::Configure->new();
27 test_step_thru_runstep($conf, q{init::defaults}, $args);
29 my ($task, $step_name, $step, $ret);
30 my $pkg = q{auto::fink};
32 $conf->add_steps($pkg);
33 $conf->options->set(%{$args});
34 $task = $conf->steps->[-1];
35 $step_name   = $task->step;
37 $step = $step_name->new();
38 ok(defined $step, "$step_name constructor returned defined value");
39 isa_ok($step, $step_name);
40 ok($step->description(), "$step_name has description");
42 # Success in the following test means:
43 # (a) OS is Darwin.
44 # (b) Either Fink is not installed or it is installed correctly, i.e., we can
45 # locate the Fink subdirectories we need for later Parrot configuration steps.
46 ok($step->runstep($conf), "runstep() returned true value");
48 pass("Completed all tests in $0");
50 ################### DOCUMENTATION ###################
52 =head1 NAME
54 auto_fink-01.t - test config::auto::fink
56 =head1 SYNOPSIS
58     % prove t/steps/auto_fink-01.t
60 =head1 DESCRIPTION
62 The files in this directory test functionality used by F<Configure.pl>.
64 The tests in this file run on Darwin only and test config::auto::fink.
66 =head1 AUTHOR
68 James E Keenan
70 =head1 SEE ALSO
72 config::auto::fink, 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: