perl.cvs.parrot
[Top] [All Lists]

[svn:parrot] r30663 - in trunk: . t/configure

Subject: [svn:parrot] r30663 - in trunk: . t/configure
From:
Date: Sat, 30 Aug 2008 18:53:45 -0700 PDT
Newsgroups: perl.cvs.parrot

Author: jkeenan
Date: Sat Aug 30 18:53:44 2008
New Revision: 30663

Removed:
   trunk/t/configure/060-silent.t
Modified:
   trunk/MANIFEST
   trunk/t/configure/059-silent.t

Log:
[configure] Consolidating some tests of the configuration system into a single
file.  (Cf.:  http://rt.perl.org/rt3/Ticket/Display.html?id=57492. 


Modified: trunk/MANIFEST
==============================================================================
--- trunk/MANIFEST      (original)
+++ trunk/MANIFEST      Sat Aug 30 18:53:44 2008
@@ -1,7 +1,7 @@
 # ex: set ro:
 # $Id$
 #
-# generated by tools/dev/mk_manifest_and_skip.pl Sun Aug 31 01:41:36 2008 UT
+# generated by tools/dev/mk_manifest_and_skip.pl Sun Aug 31 01:52:06 2008 UT
 #
 # See tools/dev/install_files.pl for documentation on the
 # format of this file.
@@ -3366,7 +3366,6 @@
 t/configure/050-fatal.t                                     []
 t/configure/051-fatal_step.t                                []
 t/configure/059-silent.t                                    []
-t/configure/060-silent.t                                    []
 t/configure/061-revision_from_cache.t                       []
 t/configure/testlib/Make_VERSION_File.pm                    []
 t/configure/testlib/Tie/Filehandle/Preempt/Stdin.pm         []

Modified: trunk/t/configure/059-silent.t
==============================================================================
--- trunk/t/configure/059-silent.t      (original)
+++ trunk/t/configure/059-silent.t      Sat Aug 30 18:53:44 2008
@@ -6,7 +6,7 @@
 use strict;
 use warnings;
 
-use Test::More tests => 12;
+use Test::More tests => 13;
 use Carp;
 use lib qw( lib t/configure/testlib );
 use Parrot::Configure;
@@ -27,6 +27,7 @@
 
 my $conf = Parrot::Configure->new;
 ok( defined $conf, "Parrot::Configure->new() returned okay" );
+my $serialized = $conf->pcfreeze();
 
 my $step        = q{init::gamma};
 my $description = 'Determining if your computer does gamma';
@@ -57,6 +58,27 @@
 qr/step $step died during execution: Dying gamma just to see what happens/,
         "Got expected error message despite silent option");
 
+$conf->replenish($serialized);
+
+##### --silent option; valid step #####
+
+($args, $step_list_ref) = process_options(
+    {
+        argv => [ q{--silent} ],
+        mode => q{configure},
+    }
+);
+%args = %$args;
+$step        = q{init::lambda};
+$conf->add_steps($step);
+$conf->options->set(%args);
+{
+    my $rv;
+    my ($stdout);
+    capture ( sub { eval { $rv = $conf->runsteps; } }, \$stdout);
+    ok(! $stdout, "silent option worked");
+}
+
 pass("Completed all tests in $0");
 
 ################### DOCUMENTATION ###################
@@ -73,8 +95,8 @@
 
 The files in this directory test functionality used by F<Configure.pl>.
 
-The tests in this file examine what happens when your configuration step dies
-during execution but the C<--silent> option has been set.
+The tests in this file examine various cases occurring while using the
+C<--silent> option.
 
 =head1 AUTHOR
 

<Prev in Thread] Current Thread [Next in Thread>
  • [svn:parrot] r30663 - in trunk: . t/configure, jkeenan <=