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::attributes');
13 use Parrot::Configure;
14 use Parrot::Configure::Options qw( process_options );
15 use Parrot::Configure::Test qw( test_step_thru_runstep);
16 use IO::CaptureOutput qw | capture |;
18 my $args = process_options( {
23 my $conf = Parrot::Configure->new();
25 test_step_thru_runstep($conf, q{init::defaults}, $args);
27 my ($task, $step_name, $step, $ret);
28 my $pkg = q{auto::attributes};
30 $conf->add_steps($pkg);
31 $conf->options->set(%{$args});
32 $task = $conf->steps->[-1];
33 $step_name = $task->step;
35 $step = $step_name->new();
36 ok(defined $step, "$step_name constructor returned defined value");
37 isa_ok($step, $step_name);
38 ok($step->description(), "$step_name has description");
44 sub { $rv = $step->runstep($conf); },
47 ok( defined $rv, "$step_name runstep() returned defined value" );
48 unlike($conf->data->get('ccflags'),
49 qr/HASATTRIBUTE_NEVER_WORKS/,
50 "'ccflags' excludes bogus attribute as expected"
54 pass("Completed all tests in $0");
56 ################### DOCUMENTATION ###################
60 auto_attributes-01.t - test config::auto::attributes
64 % prove t/steps/auto_attributes-01.t
68 The files in this directory test functionality used by F<Configure.pl>.
70 The tests in this file test subroutines exported by config::auto::attributes.
78 config::auto::attributes, F<Configure.pl>.
84 # cperl-indent-level: 4
87 # vim: expandtab shiftwidth=4: