Author: jkeenan
Date: Sun Jul 20 18:41:01 2008
New Revision: 29638

Modified:
   branches/parallel/t/steps/gen_config_h-01.t

Log:
Add tests for existence of files prerequisite to gen::config_h's operation.  
Add POD.

Modified: branches/parallel/t/steps/gen_config_h-01.t
==============================================================================
--- branches/parallel/t/steps/gen_config_h-01.t (original)
+++ branches/parallel/t/steps/gen_config_h-01.t Sun Jul 20 18:41:01 2008
@@ -5,16 +5,34 @@
 
 use strict;
 use warnings;
-use Test::More tests =>  2;
+use Test::More tests =>  7;
 use Carp;
 use lib qw( lib );
 use_ok('config::gen::config_h');
-
-=for hints_for_testing (At last!  A config/ package with somewhat
-adequate documentation!)  Consider testing the content of the files
-which the POD claims the module creates.
-
-=cut
+use Parrot::Configure;
+use Parrot::Configure::Options qw( process_options );
+use Parrot::Configure::Test qw(
+    test_step_thru_runstep
+    rerun_defaults_for_testing
+    test_step_constructor_and_description
+);
+
+my $args = process_options(
+    {
+        argv => [ ],
+        mode => q{configure},
+    }
+);
+
+my $conf = Parrot::Configure->new;
+my $pkg = q{gen::config_h};
+$conf->add_steps($pkg);
+$conf->options->set( %{$args} );
+my $step = test_step_constructor_and_description($conf);
+ok(-f 'config/gen/config_h/config_h.in',
+    "Prequisite file config_h.in located");
+ok(-f 'config/gen/config_h/feature_h.in',
+    "Prequisite file feathre_h.in located");
 
 pass("Completed all tests in $0");
 
@@ -32,7 +50,12 @@
 
 The files in this directory test functionality used by F<Configure.pl>.
 
-The tests in this file test subroutines exported by config::gen::config_h.
+The tests in this file test configuration step gen::config_h.  Since this step
+is primarily concerned with printing to files based on reading certain source
+files and reading data stored in the Parrot::Configure object over the course
+of configuration, no complete simulation by a test file is feasible.  We
+therefore content ourselves with seeing whether the source files needed by the
+step can be located.
 
 =head1 AUTHOR
 

Reply via email to