2 # Copyright (C) 2007-2009, Parrot Foundation.
8 use Test::More tests => 11;
11 use File::Temp qw( tempdir );
13 use_ok('config::gen::config_h');
14 use Parrot::Configure::Options qw( process_options );
15 use Parrot::Configure::Step::Test;
16 use Parrot::Configure::Test qw(
17 test_step_constructor_and_description
19 use Parrot::Configure::Utils qw( _slurp );
21 ########## regular ##########
23 my ($args, $step_list_ref) = process_options(
30 my $conf = Parrot::Configure::Step::Test->new;
31 $conf->include_config_results( $args );
33 my $serialized = $conf->pcfreeze();
35 my $pkg = q{gen::config_h};
36 $conf->add_steps($pkg);
37 $conf->options->set( %{$args} );
38 my $step = test_step_constructor_and_description($conf);
39 ok(-f $step->{templates}->{config_h}, "Template for config_h located");
40 ok(-f $step->{templates}->{feature_h}, "Template for feature_h located");
41 ok(-f $step->{templates}->{has_header_h}, "Template for has_header_h located");
43 $conf->replenish($serialized);
45 ($args, $step_list_ref) = process_options( {
46 argv => [ q{--define=inet_aton} ],
49 $conf->add_steps($pkg);
50 $conf->options->set( %{$args} );
51 $step = test_step_constructor_and_description($conf);
53 pass("Completed all tests in $0");
55 ################### DOCUMENTATION ###################
59 gen/config_h-01.t - test gen::config_h
63 % prove t/steps/gen/config_h-01.t
67 The files in this directory test functionality used by F<Configure.pl>.
69 The tests in this file test configuration step gen::config_h. Since this step
70 is primarily concerned with printing to files based on reading certain source
71 files and reading data stored in the Parrot::Configure object over the course
72 of configuration, no complete simulation by a test file is feasible. We
73 therefore content ourselves with seeing whether the source files needed by the
82 config::gen::config_h, F<Configure.pl>.
88 # cperl-indent-level: 4
91 # vim: expandtab shiftwidth=4: