[Bps-public-commit] SD branch, master, updated. cbc820d18f7c39d002950976bb236b7b2ec58991
spang at bestpractical.com
spang at bestpractical.com
Wed Aug 12 13:38:32 EDT 2009
The branch, master has been updated
via cbc820d18f7c39d002950976bb236b7b2ec58991 (commit)
from 83d39a83be02f6b5a41e2f54c7a4dae15e2ba246 (commit)
Summary of changes:
t/sd-usage.t | 14 ++++++++++----
1 files changed, 10 insertions(+), 4 deletions(-)
- Log -----------------------------------------------------------------
commit cbc820d18f7c39d002950976bb236b7b2ec58991
Author: Christine Spang <spang at bestpractical.com>
Date: Wed Aug 12 18:32:12 2009 +0100
Loosen usage tests to work around failure where a redefine warning leaks
through under Test::Harness's runtests (but not using prove).
diff --git a/t/sd-usage.t b/t/sd-usage.t
index f4ed638..0694e2d 100644
--- a/t/sd-usage.t
+++ b/t/sd-usage.t
@@ -101,7 +101,10 @@ for my $item ( @cmds ) {
chomp $got_error;
chomp $exp_error;
}
- is( $got_error, $exp_error, $item->{comment} . ' (non-shell)' );
+ # 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)' );
}
$in_interactive_shell = 1;
@@ -123,8 +126,11 @@ 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