From c26236d93c2109336646b727d4293ef30f7749ae Mon Sep 17 00:00:00 2001 From: Adam Spiers Date: Thu, 17 Nov 2011 18:46:32 +0000 Subject: [PATCH] Debug with maximum verbosity to STDOUT when running tests. --- stow.in | 5 ++++- t/util.pm | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/stow.in b/stow.in index 4b68246..704fe64 100755 --- a/stow.in +++ b/stow.in @@ -263,7 +263,10 @@ sub process_options { #============================================================================= sub debug { my ($level, $msg) = @_; - if ($Option{'verbose'} >= $level) { + if ($Option{'testmode'}) { + print "# $msg\n" if $ENV{TEST_VERBOSE}; + } + elsif ($Option{'verbose'} >= $level) { warn "$msg\n"; } } diff --git a/t/util.pm b/t/util.pm index 0beade9..7241cf6 100755 --- a/t/util.pm +++ b/t/util.pm @@ -21,7 +21,7 @@ sub reset_state { @::Conflicts = (); %::Link_Task_For = (); %::Dir_Task_For = (); - %::Option = (); + %::Option = ( testmode => 1 ); return; }