2 # Copyright (C) 2007, The Perl Foundation.
8 use Test::More tests => 17;
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(
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 ###################
58 auto_alignptrs-07.t - test config::auto::alignptrs
62 % prove t/steps/auto_alignptrs-07.t
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.
76 config::auto::alignptrs, F<Configure.pl>.
82 # cperl-indent-level: 4
85 # vim: expandtab shiftwidth=4: