2 # Copyright (C) 2007, The Perl Foundation.
8 use Test::More tests => 12;
10 use lib qw( lib t/configure/testlib );
11 use_ok('config::init::defaults');
12 use_ok('config::auto::memalign');
13 use Parrot::Configure;
14 use Parrot::Configure::Options qw( process_options );
15 use Parrot::Configure::Test qw( test_step_thru_runstep);
17 my $args = process_options(
24 my $conf = Parrot::Configure->new;
26 test_step_thru_runstep( $conf, q{init::defaults}, $args );
28 my $pkg = q{auto::memalign};
30 $conf->add_steps($pkg);
31 $conf->options->set( %{$args} );
33 my ( $task, $step_name, $step);
34 $task = $conf->steps->[-1];
35 $step_name = $task->step;
37 $step = $step_name->new();
38 ok( defined $step, "$step_name constructor returned defined value" );
39 isa_ok( $step, $step_name );
42 $conf->data->set( memalign => 'memalign');
43 my $ret = $step->runstep($conf);
44 ok( $ret, "$step_name runstep() returned true value" );
45 is($step->result(), q{already set}, "Expected result was set");
46 is($conf->data->get('memalign'),
48 "memalign set as expected"
51 pass("Completed all tests in $0");
53 ################### DOCUMENTATION ###################
57 auto_memalign-02.t - test config::auto::memalign
61 % prove t/steps/auto_memalign-02.t
65 The files in this directory test functionality used by F<Configure.pl>.
67 The tests in this file test subroutines exported by
68 config::auto::memalign.
76 config::auto::memalign, F<Configure.pl>.
82 # cperl-indent-level: 4
85 # vim: expandtab shiftwidth=4: