Author: jkeenan
Date: Thu Sep  6 17:22:04 2007
New Revision: 21117

Added:
   branches/reconfigure/t/configure/105-init_hints.04.t
Modified:
   branches/reconfigure/MANIFEST
   branches/reconfigure/config/init/hints.pm

Log:
Add 105-init_hints.04.t to squeeze a little bit more coverage out of tests for 
init::hints.  Correct spelling error in POD for config::init::hints.

Modified: branches/reconfigure/MANIFEST
==============================================================================
--- branches/reconfigure/MANIFEST       (original)
+++ branches/reconfigure/MANIFEST       Thu Sep  6 17:22:04 2007
@@ -1,7 +1,7 @@
 # ex: set ro:
 # $Id$
 #
-# generated by tools/dev/mk_manifest_and_skip.pl Thu Sep  6 02:18:36 2007 UT
+# generated by tools/dev/mk_manifest_and_skip.pl Fri Sep  7 00:21:04 2007 UT
 #
 # See tools/dev/install_files.pl for documentation on the
 # format of this file.
@@ -2926,6 +2926,7 @@
 t/configure/105-init_hints.01.t                             []
 t/configure/105-init_hints.02.t                             []
 t/configure/105-init_hints.03.t                             []
+t/configure/105-init_hints.04.t                             []
 t/configure/106-init_headers.t                              []
 t/configure/107-inter_progs.01.t                            []
 t/configure/107-inter_progs.02.t                            []

Modified: branches/reconfigure/config/init/hints.pm
==============================================================================
--- branches/reconfigure/config/init/hints.pm   (original)
+++ branches/reconfigure/config/init/hints.pm   Thu Sep  6 17:22:04 2007
@@ -40,8 +40,8 @@
     eval "use $hints";
     die $@ if $@;
 
-    # call the runstep method if it exists.  Otherwise the step must have done
-    # it's work when it was loaded.
+    # Call the runstep method if it exists.
+    # Otherwise the step must have done its work when it was loaded.
     $hints->runstep( $conf, @_ ) if $hints->can('runstep');
     $hints_used++;
 

Added: branches/reconfigure/t/configure/105-init_hints.04.t
==============================================================================
--- (empty file)
+++ branches/reconfigure/t/configure/105-init_hints.04.t        Thu Sep  6 
17:22:04 2007
@@ -0,0 +1,88 @@
+#! perl
+# Copyright (C) 2007, The Perl Foundation.
+# $Id: 105-init_hints.04.t 20998 2007-09-02 13:56:56Z jkeenan $
+# 105-init_hints.04.t
+
+use strict;
+use warnings;
+use Test::More tests => 16;
+use Carp;
+use Cwd;
+use File::Path ();
+use File::Temp qw(tempdir);
+use lib qw( lib t/configure/testlib );
+use_ok('config::init::defaults');
+use_ok('config::init::install');
+use_ok('config::init::hints');
+use Parrot::Configure;
+use Parrot::Configure::Options qw( process_options );
+use Parrot::IO::Capture::Mini;
+use Parrot::Configure::Test qw( test_step_thru_runstep);
+
+my $args = process_options( {
+    argv            => [ ],
+    mode            => q{configure},
+} );
+
+my $conf = Parrot::Configure->new;
+
+test_step_thru_runstep($conf, q{init::defaults}, $args);
+test_step_thru_runstep($conf, q{init::install}, $args);
+
+my ($task, $step_name, @step_params, $step, $ret);
+my $pkg = q{init::hints};
+
+$conf->add_steps($pkg);
+$conf->options->set(%{$args});
+
+$task = $conf->steps->[2];
+$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");
+
+{
+    local $^O = q{imaginaryOS};
+    eval { $ret = $step->runstep($conf); };
+    like($@,
+        qr{^Can't locate init/hints/$^O\.pm}i,
+        "Got expected error message upon bad value for \$^O");
+}
+
+pass("Completed all tests in $0");
+
+################### DOCUMENTATION ###################
+
+=head1 NAME
+
+105-init_hints.04.t - test config::init::hints
+
+=head1 SYNOPSIS
+
+    % prove t/configure/105-init_hints.04.t
+
+=head1 DESCRIPTION
+
+The files in this directory test functionality used by F<Configure.pl>.
+
+The tests in this file test subroutines exported by config::init::hints.
+
+=head1 AUTHOR
+
+James E Keenan
+
+=head1 SEE ALSO
+
+config::init::hints, F<Configure.pl>.
+
+=cut
+
+# Local Variables:
+#   mode: cperl
+#   cperl-indent-level: 4
+#   fill-column: 100
+# End:
+# vim: expandtab shiftwidth=4:

Reply via email to