2 # Copyright (C) 2007, Parrot Foundation.
8 use Test::More tests => 16;
10 use lib qw( lib t/configure/testlib );
11 use_ok('config::auto::socklen_t');
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
17 use IO::CaptureOutput qw| capture |;
19 ########### regular ###########
21 my ($args, $step_list_ref) = process_options(
28 my $conf = Parrot::Configure::Step::Test->new;
29 $conf->include_config_results( $args );
31 my $pkg = q{auto::socklen_t};
33 $conf->add_steps($pkg);
35 my $serialized = $conf->pcfreeze();
37 $conf->options->set( %{$args} );
38 my $step = test_step_constructor_and_description($conf);
39 my $ret = $step->runstep($conf);
40 ok( $ret, "runstep() returned true value" );
41 ok(defined($step->result()), "A result has been defiined");
43 $conf->replenish($serialized);
45 ##### _evaluate_socklen_t() #####
47 ($args, $step_list_ref) = process_options(
53 $conf->options->set( %{$args} );
54 $step = test_step_constructor_and_description($conf);
58 $d_socklen_t = q{alpha};
59 ok($step->_evaluate_socklen_t($conf, $d_socklen_t),
60 "_evaluate_socklen_t() completed satisfactorily");
61 is($step->result(), q{yes}, "Got expected result");
62 is($conf->data->get('has_socklen_t'), 1,
63 "has_socklen_t set as expected");
66 ok($step->_evaluate_socklen_t($conf, $d_socklen_t),
67 "_evaluate_socklen_t() completed satisfactorily");
68 is($step->result(), q{no}, "Got expected result");
69 is($conf->data->get('has_socklen_t'), 0,
70 "has_socklen_t set as expected");
72 pass("Completed all tests in $0");
74 ################### DOCUMENTATION ###################
78 auto/socklen_t-01.t - test auto::socklen_t
82 % prove t/steps/auto/socklen_t-01.t
86 The files in this directory test functionality used by F<Configure.pl>.
88 The tests in this file test auto::socklen_t.
96 config::auto::socklen_t, F<Configure.pl>.
102 # cperl-indent-level: 4
105 # vim: expandtab shiftwidth=4: