Author: jkeenan
Date: Sat Jul 19 16:52:03 2008
New Revision: 29619

Removed:
   branches/parallel/t/steps/inter_types-02.t
Modified:
   branches/parallel/MANIFEST
   branches/parallel/t/steps/inter_shlibs-01.t
   branches/parallel/t/steps/inter_types-01.t

Log:
Consolidate multiple test files per configuration step into a single file.


Modified: branches/parallel/MANIFEST
==============================================================================
--- branches/parallel/MANIFEST  (original)
+++ branches/parallel/MANIFEST  Sat Jul 19 16:52:03 2008
@@ -1,7 +1,7 @@
 # ex: set ro:
 # $Id$
 #
-# generated by tools/dev/mk_manifest_and_skip.pl Sat Jul 19 23:45:14 2008 UT
+# generated by tools/dev/mk_manifest_and_skip.pl Sat Jul 19 23:51:51 2008 UT
 #
 # See tools/dev/install_files.pl for documentation on the
 # format of this file.
@@ -3686,7 +3686,6 @@
 t/steps/inter_progs-01.t                                    []
 t/steps/inter_shlibs-01.t                                   []
 t/steps/inter_types-01.t                                    []
-t/steps/inter_types-02.t                                    []
 t/steps/inter_yacc-01.t                                     []
 t/steps/inter_yacc-02.t                                     []
 t/steps/inter_yacc-03.t                                     []

Modified: branches/parallel/t/steps/inter_shlibs-01.t
==============================================================================
--- branches/parallel/t/steps/inter_shlibs-01.t (original)
+++ branches/parallel/t/steps/inter_shlibs-01.t Sat Jul 19 16:52:03 2008
@@ -17,7 +17,6 @@
     rerun_defaults_for_testing
     test_step_constructor_and_description
 );
-use IO::CaptureOutput qw| capture |;
 use Tie::Filehandle::Preempt::Stdin;
 
 my $args = process_options(

Modified: branches/parallel/t/steps/inter_types-01.t
==============================================================================
--- branches/parallel/t/steps/inter_types-01.t  (original)
+++ branches/parallel/t/steps/inter_types-01.t  Sat Jul 19 16:52:03 2008
@@ -5,14 +5,19 @@
 
 use strict;
 use warnings;
-use Test::More tests => 11;
+use Test::More tests => 17;
 use Carp;
 use lib qw( lib t/configure/testlib );
 use_ok('config::init::defaults');
 use_ok('config::inter::types');
 use Parrot::Configure;
 use Parrot::Configure::Options qw( process_options );
-use Parrot::Configure::Test qw( test_step_thru_runstep);
+use Parrot::Configure::Test qw(
+    test_step_thru_runstep
+    rerun_defaults_for_testing
+    test_step_constructor_and_description
+);
+use Tie::Filehandle::Preempt::Stdin;
 
 my $args = process_options(
     {
@@ -28,19 +33,46 @@
 my $pkg = q{inter::types};
 
 $conf->add_steps($pkg);
-$conf->options->set( %{$args} );
 
-my ( $task, $step_name, $step);
-$task        = $conf->steps->[-1];
-$step_name   = $task->step;
-
-$step = $step_name->new();
-ok( defined $step, "$step_name constructor returned defined value" );
-isa_ok( $step, $step_name );
-ok( $step->description(), "$step_name has description" );
+my $serialized = $conf->pcfreeze();
 
+$conf->options->set( %{$args} );
+my $step = test_step_constructor_and_description($conf);
 my $ret = $step->runstep($conf);
-ok( $ret, "$step_name runstep() returned true value" );
+ok( $ret, "runstep() returned true value" );
+
+$conf->replenish($serialized);
+
+$args = process_options(
+    {
+        argv => [q{--ask}],
+        mode => q{configure},
+    }
+);
+$conf->options->set( %{$args} );
+$step = test_step_constructor_and_description($conf);
+
+my ( @prompts, $object );
+
+$conf->options->set('intval' => 'alpha');
+$conf->options->set('floatval' => 'beta');
+$conf->options->set('opcode' => 'gamma');
[EMAIL PROTECTED] = qw( delta epsilon zeta );
+
+$object = tie *STDIN, 'Tie::Filehandle::Preempt::Stdin', @prompts;
+can_ok( 'Tie::Filehandle::Preempt::Stdin', ('READLINE') );
+isa_ok( $object, 'Tie::Filehandle::Preempt::Stdin' );
+
+{
+    open STDOUT, '>', "/dev/null" or croak "Unable to open to myout";
+    my $ret = $step->runstep($conf);
+    close STDOUT or croak "Unable to close after myout";
+    ok( $ret, "runstep() returned true value" );
+}
+
+undef $object;
+untie *STDIN;
[EMAIL PROTECTED] = ();
 
 pass("Completed all tests in $0");
 

Reply via email to