2 # Copyright (C) 2001-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 $ENV{TEST_CTAGS} = [ ( 'foobar' ) ];
13 use_ok('config::auto::ctags');
14 use Parrot::Configure;
15 use Parrot::Configure::Options qw( process_options );
16 use Parrot::Configure::Test qw( test_step_thru_runstep);
17 use IO::CaptureOutput qw| capture |;
19 my $args = process_options(
21 argv => [ q{--verbose} ],
26 my $conf = Parrot::Configure->new;
28 test_step_thru_runstep( $conf, q{init::defaults}, $args );
30 my $pkg = q{auto::ctags};
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 );
47 sub { $step->runstep($conf) },
50 ok( $ret, "$step_name runstep() returned true value" );
51 is($step->result(), q{no}, "Got expected result");
52 is($conf->data->get('ctags'), 'ctags',
53 "Correct value for 'ctags' attribute was set");
57 pass("Completed all tests in $0");
59 ################### DOCUMENTATION ###################
63 t/steps/auto_ctags-02.t - tests Parrot::Configure step auto::ctags
67 prove t/steps/auto_ctags-02.t
71 Regression tests for the L<Parrot::Configure step auto::ctags> module.
72 This file holds tests for Parrot::Configure step auto::ctags::runstep()
73 (a non-exported subroutine).
77 Paul Cochrane <paultcochrane at gmail dot com>
83 # cperl-indent-level: 4
86 # vim: expandtab shiftwidth=4: