Revision 29638

Date:
2008/07/21 01:41:01
Author:
jkeenan
Revision Log:
Add tests for existence of files prerequisite to gen::config_h's operation. Add POD.
Files:

Legend:

 
Added
 
Removed
 
Modified
  • branches/parallel/t/steps/gen_config_h-01.t

     
    5 5
    6 6 use strict;
    7 7 use warnings;
    8 use Test::More tests => 2;
    8 use Test::More tests => 7;
    9 9 use Carp;
    10 10 use lib qw( lib );
    11 11 use_ok('config::gen::config_h');
    12 use Parrot::Configure;
    13 use Parrot::Configure::Options qw( process_options );
    14 use Parrot::Configure::Test qw(
    15 test_step_thru_runstep
    16 rerun_defaults_for_testing
    17 test_step_constructor_and_description
    18 );
    12 19
    13 =for hints_for_testing (At last! A config/ package with somewhat
    14 adequate documentation!) Consider testing the content of the files
    15 which the POD claims the module creates.
    20 my $args = process_options(
    21 {
    22 argv => [ ],
    23 mode => q{configure},
    24 }
    25 );
    16 26
    17 =cut
    27 my $conf = Parrot::Configure->new;
    28 my $pkg = q{gen::config_h};
    29 $conf->add_steps($pkg);
    30 $conf->options->set( %{$args} );
    31 my $step = test_step_constructor_and_description($conf);
    32 ok(-f 'config/gen/config_h/config_h.in',
    33 "Prequisite file config_h.in located");
    34 ok(-f 'config/gen/config_h/feature_h.in',
    35 "Prequisite file feathre_h.in located");
    18 36
    19 37 pass("Completed all tests in $0");
    20 38
     
    32 50
    33 51 The files in this directory test functionality used by F<Configure.pl>.
    34 52
    35 The tests in this file test subroutines exported by config::gen::config_h.
    53 The tests in this file test configuration step gen::config_h. Since this step
    54 is primarily concerned with printing to files based on reading certain source
    55 files and reading data stored in the Parrot::Configure object over the course
    56 of configuration, no complete simulation by a test file is feasible. We
    57 therefore content ourselves with seeing whether the source files needed by the
    58 step can be located.
    36 59
    37 60 =head1 AUTHOR
    38 61