Author: jkeenan Date: Sat Nov 10 19:05:25 2007 New Revision: 22789 Added: trunk/t/configure/145-auto_gdbm-01.t (contents, props changed) Removed: trunk/t/configure/145-auto_gdbm.t Modified: trunk/MANIFEST
Log: First real test file for configuration step auto::gdbm. Here, test case where --without-gdbm option is provided. Modified: trunk/MANIFEST ============================================================================== --- trunk/MANIFEST (original) +++ trunk/MANIFEST Sat Nov 10 19:05:25 2007 @@ -1,7 +1,7 @@ # ex: set ro: # $Id$ # -# generated by tools/dev/mk_manifest_and_skip.pl Sat Nov 10 01:52:43 2007 UT +# generated by tools/dev/mk_manifest_and_skip.pl Sun Nov 11 03:03:08 2007 UT # # See tools/dev/install_files.pl for documentation on the # format of this file. @@ -3100,7 +3100,7 @@ t/configure/142-auto_aio.t [] t/configure/143-auto_gmp.t [] t/configure/144-auto_readline.t [] -t/configure/145-auto_gdbm.t [] +t/configure/145-auto_gdbm-01.t [] t/configure/146-auto_snprintf-01.t [] t/configure/146-auto_snprintf-02.t [] t/configure/146-auto_snprintf-03.t [] Added: trunk/t/configure/145-auto_gdbm-01.t ============================================================================== --- (empty file) +++ trunk/t/configure/145-auto_gdbm-01.t Sat Nov 10 19:05:25 2007 @@ -0,0 +1,92 @@ +#! perl +# Copyright (C) 2007, The Perl Foundation. +# $Id$ +# 145-auto_gdbm-01.t + +use strict; +use warnings; +use Test::More tests => 14; +use Carp; +use lib qw( lib t/configure/testlib ); +use_ok('config::init::defaults'); +use_ok('config::auto::gdbm'); +use Parrot::Configure; +use Parrot::Configure::Options qw( process_options ); +use Parrot::Configure::Test qw( test_step_thru_runstep); + +=for hints_for_testing The documentation for this package is skimpy; +please try to improve it, e.g., by providing a short description of what +the 'gdbm' is. Some branches are compiler- or OS-specific. As noted in +a comment in the module, please consider the issues raised in +http://rt.perl.org/rt3/Ticket/Display.html?id=43134. + +=cut + +my $args = process_options( + { + argv => [ q{--without-gdbm} ], + mode => q{configure}, + } +); + +my $conf = Parrot::Configure->new; + +test_step_thru_runstep( $conf, q{init::defaults}, $args ); + +my $pkg = q{auto::gdbm}; + +$conf->add_steps($pkg); +$conf->options->set( %{$args} ); + +my ( $task, $step_name, @step_params, $step); +$task = $conf->steps->[1]; +$step_name = $task->step; [EMAIL PROTECTED] = @{ $task->params }; + +$step = $step_name->new(); +ok( defined $step, "$step_name constructor returned defined value" ); +isa_ok( $step, $step_name ); +ok( $step->description(), "$step_name has description" ); + +my $ret = $step->runstep($conf); +ok( $ret, "$step_name runstep() returned true value" ); +is($conf->data->get('has_gdbm'), 0, + "Got expected value for 'has_gdbm'"); +is($step->result(), q{no}, "Expected result was set"); + +pass("Keep Devel::Cover happy"); +pass("Completed all tests in $0"); + +################### DOCUMENTATION ################### + +=head1 NAME + +145-auto_gdbm-01.t - test config::auto::gdbm + +=head1 SYNOPSIS + + % prove t/configure/145-auto_gdbm-01.t + +=head1 DESCRIPTION + +The files in this directory test functionality used by F<Configure.pl>. + +The tests in this file test config::auto::gdbm in the case where the +C<--without-gdbm> option is set. + +=head1 AUTHOR + +James E Keenan + +=head1 SEE ALSO + +config::auto::gdbm, F<Configure.pl>. + +=cut + +# Local Variables: +# mode: cperl +# cperl-indent-level: 4 +# fill-column: 100 +# End: +# vim: expandtab shiftwidth=4: