tagged release 0.6.4
[parrot.git] / t / steps / inter_libparrot-04.t
blobc78e2f856460dc6f073a1064cf62e83c5f0b5807
1 #! perl
2 # Copyright (C) 2007, The Perl Foundation.
3 # $Id$
4 # inter_libparrot-04.t
6 use strict;
7 use warnings;
8 use Test::More tests =>  16;
9 use Carp;
10 use lib qw( lib t/configure/testlib );
11 use_ok('config::init::defaults');
12 use_ok('config::init::install');
13 use_ok('config::inter::libparrot');
14 use Parrot::Configure;
15 use Parrot::Configure::Options qw( process_options );
16 use Parrot::Configure::Test qw( test_step_thru_runstep);
18 my $args = process_options(
19     {
20         argv => [ q{--parrot_is_shared} ],
21         mode => q{configure},
22     }
25 my $conf = Parrot::Configure->new;
27 test_step_thru_runstep( $conf, q{init::defaults}, $args );
28 test_step_thru_runstep( $conf, q{init::install}, $args );
30 my $pkg = q{inter::libparrot};
32 $conf->add_steps($pkg);
33 $conf->options->set( %{$args} );
35 my ( $task, $step_name, $step);
36 $task        = $conf->steps->[-1];
37 $step_name   = $task->step;
39 $step = $step_name->new();
40 ok( defined $step, "$step_name constructor returned defined value" );
41 isa_ok( $step, $step_name );
44 $conf->data->set('has_dynamic_linking' => 1);
45 $conf->data->set('rpath' => q{-L});
48     open STDOUT, '>', "/dev/null" or croak "Unable to open to myout";
49     my $ret = $step->runstep($conf);
50     close STDOUT or croak "Unable to close after myout";
51     ok( $ret, "$step_name runstep() returned true value" );
53 is($step->result(), 'yes', "Expected result was set");
55 pass("Completed all tests in $0");
57 ################### DOCUMENTATION ###################
59 =head1 NAME
61 inter_libparrot-04.t - test config::inter::libparrot
63 =head1 SYNOPSIS
65     % prove t/steps/inter_libparrot-04.t
67 =head1 DESCRIPTION
69 The files in this directory test functionality used by F<Configure.pl>.
71 The tests in this file test subroutines exported by config::inter::libparrot.
73 =head1 AUTHOR
75 James E Keenan
77 =head1 SEE ALSO
79 config::inter::libparrot, F<Configure.pl>.
81 =cut
83 # Local Variables:
84 #   mode: cperl
85 #   cperl-indent-level: 4
86 #   fill-column: 100
87 # End:
88 # vim: expandtab shiftwidth=4: