2 # Copyright (C) 2007, The Perl Foundation.
9 plan( skip_all => 'Fink is Darwin only' ) unless $^O =~ /darwin/;
12 use lib qw( lib t/configure/testlib );
13 use_ok('config::init::defaults');
14 use_ok('config::auto::fink');
15 use Parrot::Configure;
16 use Parrot::Configure::Options qw( process_options );
17 use Parrot::Configure::Test qw( test_step_thru_runstep);
19 my $args = process_options( {
24 my $conf = Parrot::Configure->new();
26 test_step_thru_runstep($conf, q{init::defaults}, $args);
28 my ($task, $step_name, $step, $ret);
29 my $pkg = q{auto::fink};
31 $conf->add_steps($pkg);
32 $conf->options->set(%{$args});
33 $task = $conf->steps->[-1];
34 $step_name = $task->step;
36 $step = $step_name->new();
37 ok(defined $step, "$step_name constructor returned defined value");
38 isa_ok($step, $step_name);
41 $step->{fink_conf} = q{my_ridiculous_foobar};
42 my $msg = q{Fink not installed};
43 ok($step->runstep($conf), "runstep() returned true value");
44 is($step->result(), $msg,
45 "Got expected result for $msg");
47 pass("Completed all tests in $0");
49 ################### DOCUMENTATION ###################
53 auto_fink-03.t - test config::auto::fink
57 % prove t/steps/auto_fink-03.t
61 The files in this directory test functionality used by F<Configure.pl>.
63 The tests in this file test config::auto::fink in the case where the OS is
64 Darwin but Fink is not installed.
72 config::auto::fink, F<Configure.pl>.
78 # cperl-indent-level: 4
81 # vim: expandtab shiftwidth=4: