tagged release 0.6.4
[parrot.git] / t / steps / inter_libparrot-05.t
blobb5ed4c5d808acd6e792e26c72c698ae7cfd79c04
1 #! perl
2 # Copyright (C) 2007, The Perl Foundation.
3 # $Id$
4 # inter_libparrot-05.t
6 use strict;
7 use warnings;
8 use Test::More tests =>  15;
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 => [],
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('libparrot_ldflags' => 'libparrot.lib');
47     open STDOUT, '>', "/dev/null" or croak "Unable to open to myout";
48     my $ret = $step->runstep($conf);
49     close STDOUT or croak "Unable to close after myout";
50     ok( $ret, "$step_name runstep() returned true value" );
53 pass("Completed all tests in $0");
55 ################### DOCUMENTATION ###################
57 =head1 NAME
59 inter_libparrot-05.t - test config::inter::libparrot
61 =head1 SYNOPSIS
63     % prove t/steps/inter_libparrot-05.t
65 =head1 DESCRIPTION
67 The files in this directory test functionality used by F<Configure.pl>.
69 The tests in this file test subroutines exported by config::inter::libparrot.
71 =head1 AUTHOR
73 James E Keenan
75 =head1 SEE ALSO
77 config::inter::libparrot, F<Configure.pl>.
79 =cut
81 # Local Variables:
82 #   mode: cperl
83 #   cperl-indent-level: 4
84 #   fill-column: 100
85 # End:
86 # vim: expandtab shiftwidth=4: