2 # Copyright (C) 2008, Parrot Foundation.
8 use Test::More tests => 13;
10 use lib qw( lib t/configure/testlib );
11 use_ok('config::auto::glibc');
12 use Parrot::Configure::Options qw( process_options );
13 use Parrot::Configure::Step::Test;
14 use Parrot::Configure::Test qw(
15 test_step_constructor_and_description
18 ########## regular ##########
20 my ($args, $step_list_ref) = process_options( {
25 my $conf = Parrot::Configure::Step::Test->new;
26 $conf->include_config_results( $args );
28 my ($task, $step_name, $step, $ret);
29 my $pkg = q{auto::glibc};
31 $conf->add_steps($pkg);
33 my $serialized = $conf->pcfreeze();
35 $conf->options->set(%{$args});
36 $step = test_step_constructor_and_description($conf);
37 ok($step->runstep($conf), "runstep() returned true value");
39 $conf->replenish($serialized);
41 ########## _evaluate_glibc() ##########
43 $conf->options->set(%{$args});
44 $step = test_step_constructor_and_description($conf);
48 $step->_evaluate_glibc($conf, $test);
49 is( $step->result(), q{yes}, "Got expected result" );
50 is( $conf->data->get( 'glibc' ), 1, "Got expected value for 'glibc'" );
52 $test->{glibc} = undef;
53 $step->_evaluate_glibc($conf, $test);
54 is( $step->result(), q{no}, "Got expected result" );
55 ok( ! defined $conf->data->get( 'glibc' ),
56 "'glibc' undefined as expected" );
58 pass("Completed all tests in $0");
60 ################### DOCUMENTATION ###################
64 auto/glibc-01.t - test auto::glibc
68 % prove t/steps/auto/glibc-01.t
72 The files in this directory test functionality used by F<Configure.pl>.
74 The tests in this file test auto::glibc.
82 config::auto::glibc, F<Configure.pl>.
88 # cperl-indent-level: 4
91 # vim: expandtab shiftwidth=4: