* t/pmc/complex.t:
[parrot.git] / t / steps / auto_ctags-01.t
blob46df494fb9f75dfe6cb5393231acd2b1d2f0d1e3
1 #!perl
2 # Copyright (C) 2001-2007, The Perl Foundation.
3 # $Id$
4 # auto_ctags-01.t
6 use strict;
7 use warnings;
8 use Test::More tests => 14;
9 use Carp;
10 use lib qw( lib t/configure/testlib );
11 use_ok('config::init::defaults');
12 use_ok('config::auto::ctags');
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(
18     {
19         argv => [ ],
20         mode => q{configure},
21     }
24 my $conf = Parrot::Configure->new;
26 test_step_thru_runstep( $conf, q{init::defaults}, $args );
28 my $pkg = q{auto::ctags};
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 );
40 ok( $step->description(), "$step_name has description" );
42 my %possible_ctags = map {$_,1}
43     qw( ctags exuberant-ctags ctags-exuberant exctags );
45 my $ret = $step->runstep($conf);
46 ok( $ret, "$step_name runstep() returned true value" );
47 ok(defined($step->result()), "Result was defined");
48 ok($possible_ctags{$conf->data->get('ctags')},
49     "Acceptable value for 'ctags' attribute was set");
51 pass("Keep Devel::Cover happy");
52 pass("Completed all tests in $0");
54 ################### DOCUMENTATION ###################
56 =head1 NAME
58 t/steps/auto_ctags-01.t - tests Parrot::Configure step auto::ctags
60 =head1 SYNOPSIS
62     prove t/steps/auto_ctags-01.t
64 =head1 DESCRIPTION
66 Regression tests for the L<Parrot::Configure step auto::ctags> module.
67 This file holds tests for Parrot::Configure step auto::ctags::runstep()
68 (a non-exported subroutine).
70 =head1 AUTHOR
72 Paul Cochrane <paultcochrane at gmail dot com>
74 =cut
76 # Local Variables:
77 #   mode: cperl
78 #   cperl-indent-level: 4
79 #   fill-column: 100
80 # End:
81 # vim: expandtab shiftwidth=4: