2 # Copyright (C) 2007, Parrot Foundation.
9 use Test::More tests => 8;
11 use lib qw( lib t/configure/testlib );
12 use_ok('config::inter::progs');
13 use Parrot::Configure::Options qw( process_options );
14 use Parrot::Configure::Step::Test;
15 use Parrot::Configure::Test qw(
16 test_step_constructor_and_description
18 use Tie::Filehandle::Preempt::Stdin;
19 use IO::CaptureOutput qw| capture |;
21 =for hints_for_testing Testing and refactoring of inter::progs should
22 entail understanding of issues discussed in
23 https://trac.parrot.org/parrot/ticket/854
27 ########## ask ##########
29 my ($args, $step_list_ref) = process_options(
36 my $conf = Parrot::Configure::Step::Test->new;
37 $conf->include_config_results( $args );
39 my $pkg = q{inter::progs};
41 $conf->add_steps($pkg);
43 $conf->options->set( %{$args} );
44 my $step = test_step_constructor_and_description($conf);
48 my ($stdout, $debug, $debug_validity);
62 push @prompts, $conf->data->get($p);
66 $object = tie *STDIN, 'Tie::Filehandle::Preempt::Stdin', @prompts;
67 can_ok( 'Tie::Filehandle::Preempt::Stdin', ('READLINE') );
68 isa_ok( $object, 'Tie::Filehandle::Preempt::Stdin' );
72 $rv = $step->runstep($conf);
74 ok( ! defined $rv, "runstep returned undef as expected" );
79 pass("Completed all tests in $0");
81 ################### DOCUMENTATION ###################
85 inter/progs-04.t - test inter::progs
89 % prove t/steps/inter/progs-04.t
93 The files in this directory test functionality used by F<Configure.pl>.
95 The tests in this file test inter::progs.
103 config::inter::progs, F<Configure.pl>.
109 # cperl-indent-level: 4
112 # vim: expandtab shiftwidth=4: