Author: jkeenan
Date: Sun Aug 10 08:52:04 2008
New Revision: 30156

Added:
   branches/stepdescription/t/configure/055-verbose_step.t
      - copied, changed from r30155, 
/branches/stepdescription/t/configure/043-verbose_step_name.t
Modified:
   branches/stepdescription/MANIFEST
   branches/stepdescription/t/configure/043-verbose_step_name.t

Log:
Add test for bad option to --verbose-step.


Modified: branches/stepdescription/MANIFEST
==============================================================================
--- branches/stepdescription/MANIFEST   (original)
+++ branches/stepdescription/MANIFEST   Sun Aug 10 08:52:04 2008
@@ -1,7 +1,7 @@
 # ex: set ro:
 # $Id$
 #
-# generated by tools/dev/mk_manifest_and_skip.pl Sun Aug 10 02:04:26 2008 UT
+# generated by tools/dev/mk_manifest_and_skip.pl Sun Aug 10 15:51:25 2008 UT
 #
 # See tools/dev/install_files.pl for documentation on the
 # format of this file.
@@ -3321,6 +3321,7 @@
 t/configure/052-fatal_step.t                                []
 t/configure/053-fatal_step.t                                []
 t/configure/054-fatal_step.t                                []
+t/configure/055-verbose_step.t                              []
 t/configure/059-silent.t                                    []
 t/configure/060-silent.t                                    []
 t/configure/061-revision_from_cache.t                       []

Modified: branches/stepdescription/t/configure/043-verbose_step_name.t
==============================================================================
--- branches/stepdescription/t/configure/043-verbose_step_name.t        
(original)
+++ branches/stepdescription/t/configure/043-verbose_step_name.t        Sun Aug 
10 08:52:04 2008
@@ -42,8 +42,6 @@
 }
 is( $nontaskcount, 0, "Each step is a Parrot::Configure::Task object" );
 is( $confsteps[0]->step, $step, "'step' element of Parrot::Configure::Task 
struct identified" );
-#is( ref( $confsteps[0]->params ),
-#    'ARRAY', "'params' element of Parrot::Configure::Task struct is array 
ref" );
 ok( !ref( $confsteps[0]->object ),
     "'object' element of Parrot::Configure::Task struct is not yet a ref" );
 

Copied: branches/stepdescription/t/configure/055-verbose_step.t (from r30155, 
/branches/stepdescription/t/configure/043-verbose_step_name.t)
==============================================================================
--- /branches/stepdescription/t/configure/043-verbose_step_name.t       
(original)
+++ branches/stepdescription/t/configure/055-verbose_step.t     Sun Aug 10 
08:52:04 2008
@@ -1,12 +1,12 @@
 #! perl
 # Copyright (C) 2007, The Perl Foundation.
 # $Id$
-# 043-verbose_step_name.t
+# 055-verbose_step.t
 
 use strict;
 use warnings;
 
-use Test::More tests => 12;
+use Test::More tests => 11;
 use Carp;
 use lib qw( lib t/configure/testlib );
 use Parrot::Configure;
@@ -18,7 +18,7 @@
 
 my $args = process_options(
     {
-        argv => [q{--verbose-step=init::beta}],
+        argv => [q{--verbose-step=alpha::beta,init::manifest}],
         mode => q{configure},
     }
 );
@@ -42,8 +42,6 @@
 }
 is( $nontaskcount, 0, "Each step is a Parrot::Configure::Task object" );
 is( $confsteps[0]->step, $step, "'step' element of Parrot::Configure::Task 
struct identified" );
-#is( ref( $confsteps[0]->params ),
-#    'ARRAY', "'params' element of Parrot::Configure::Task struct is array 
ref" );
 ok( !ref( $confsteps[0]->object ),
     "'object' element of Parrot::Configure::Task struct is not yet a ref" );
 
@@ -51,17 +49,11 @@
 is( $conf->options->{c}->{debugging},
     1, "command-line option '--debugging' has been stored in object" );
 
-{
-    my $rv;
-    my $stdout;
-    capture ( sub {$rv    = $conf->runsteps}, \$stdout );
-    ok( $rv, "runsteps successfully ran $step" );
-    like(
-        $stdout,
-        qr/$description\.\.\..*beta\sis\sverbose/s,
-        "Got message expected upon running $step"
-    );
-}
+eval { $conf->runsteps(); };
+like($@,
+    qr/Argument to 'verbose-step' option must be comma-delimited string of 
valid configuration steps/,
+    "Got expected error message for bad value to --verbose-step"
+);
 
 pass("Completed all tests in $0");
 
@@ -69,18 +61,18 @@
 
 =head1 NAME
 
-043-verbose_step_name.t - test bad step failure case in Parrot::Configure
+055-verbose_step.t - test bad step failure case in Parrot::Configure
 
 =head1 SYNOPSIS
 
-    % prove t/configure/043-verbose_step_name.t
+    % prove t/configure/055-verbose_step.t
 
 =head1 DESCRIPTION
 
 The files in this directory test functionality used by F<Configure.pl>.
 
 The tests in this file examine what happens when you configure with the
-<--verbose-step> option set to the name of a configuration step.
+<--verbose-step> option and provide a bad value.
 
 =head1 AUTHOR
 

Reply via email to