[Bps-public-commit] SD branch, master, updated. d5f02b79c73b7f71d4cabdc9210bb37b05494c86

spang at bestpractical.com spang at bestpractical.com
Wed Aug 12 14:31:17 EDT 2009


The branch, master has been updated
       via  d5f02b79c73b7f71d4cabdc9210bb37b05494c86 (commit)
      from  cbc820d18f7c39d002950976bb236b7b2ec58991 (commit)

Summary of changes:
 t/sd-usage.t |   14 ++++----------
 1 files changed, 4 insertions(+), 10 deletions(-)

- Log -----------------------------------------------------------------
commit d5f02b79c73b7f71d4cabdc9210bb37b05494c86
Author: Christine Spang <spang at bestpractical.com>
Date:   Wed Aug 12 19:29:09 2009 +0100

    Revert "Loosen usage tests to work around failure where a redefine warning leaks"
    
    This reverts commit cbc820d18f7c39d002950976bb236b7b2ec58991. Shawn
    worked around this in Prophet.

diff --git a/t/sd-usage.t b/t/sd-usage.t
index 0694e2d..f4ed638 100644
--- a/t/sd-usage.t
+++ b/t/sd-usage.t
@@ -101,10 +101,7 @@ for my $item ( @cmds ) {
         chomp $got_error;
         chomp $exp_error;
     }
-    # use like rather than is here due to a strange redefine warning
-    # leaking through and causing this test to fail for 'browser -h'
-    # when run under Test::Harness::runtests, such as in make test
-    like( $got_error, qr/\Q$exp_error\E/, $item->{comment} . ' (non-shell)' );
+    is( $got_error, $exp_error, $item->{comment} . ' (non-shell)' );
 }
 
 $in_interactive_shell = 1;
@@ -126,11 +123,8 @@ for my $item ( @cmds ) {
     is( $got_error, $exp_error, $item->{comment} . ' (in shell)');
 }
 
-{
-    no warnings 'redefine';
-
-    sub Prophet::CLI::interactive_shell {
-        return $in_interactive_shell;
-    }
+no warnings 'redefine';
+sub Prophet::CLI::interactive_shell {
+    return $in_interactive_shell;
 }
 

-----------------------------------------------------------------------



More information about the Bps-public-commit mailing list