tagged release 0.6.4
[parrot.git] / t / steps / auto_alignptrs-07.t
blob6d1f761b030a3f59de83d28a1e884d199e2930cc
1 #! perl
2 # Copyright (C) 2007, The Perl Foundation.
3 # $Id$
4 # auto_alignptrs-07.t
6 use strict;
7 use warnings;
8 use Test::More tests =>  17;
9 use Carp;
10 use lib qw( lib t/configure/testlib );
11 use_ok('config::init::defaults');
12 use_ok('config::auto::attributes');
13 use_ok('config::auto::alignptrs');
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{auto::attributes}, $args );
30 my $pkg = q{auto::alignptrs};
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 my ($results, $try_align, $align);
45 is(auto::alignptrs::_evaluate_results(q{OK}, 2), 2,
46     "Got expected alignment");
47 is(auto::alignptrs::_evaluate_results(q{OK align}, 2), undef,
48     "Got undef as expected");
49 is(auto::alignptrs::_evaluate_results(q{foobar}, 2), undef,
50     "Got undef as expected");
52 pass("Completed all tests in $0");
54 ################### DOCUMENTATION ###################
56 =head1 NAME
58 auto_alignptrs-07.t - test config::auto::alignptrs
60 =head1 SYNOPSIS
62     % prove t/steps/auto_alignptrs-07.t
64 =head1 DESCRIPTION
66 The files in this directory test functionality used by F<Configure.pl>.
68 The tests in this file test subroutines exported by config::auto::alignptrs.
70 =head1 AUTHOR
72 James E Keenan
74 =head1 SEE ALSO
76 config::auto::alignptrs, F<Configure.pl>.
78 =cut
80 # Local Variables:
81 #   mode: cperl
82 #   cperl-indent-level: 4
83 #   fill-column: 100
84 # End:
85 # vim: expandtab shiftwidth=4: