From: Fabian Keil Date: Tue, 5 Feb 2013 14:02:43 +0000 (+0000) Subject: Only log the test number when not running in verbose mode X-Git-Tag: v_3_0_21~69 X-Git-Url: http://www.privoxy.org/gitweb/user-manual/copyright.html?a=commitdiff_plain;h=a858ca7389842eeb2677252685a39bcbacfac51f;p=privoxy.git Only log the test number when not running in verbose mode The position of the test is rarely relevant and it previously wasn't exactly obvious which one of the numbers was useful to repeat the test with --test-number. --- diff --git a/tools/privoxy-regression-test.pl b/tools/privoxy-regression-test.pl index a1911c78..436353db 100755 --- a/tools/privoxy-regression-test.pl +++ b/tools/privoxy-regression-test.pl @@ -7,7 +7,7 @@ # A regression test "framework" for Privoxy. For documentation see: # perldoc privoxy-regression-test.pl # -# $Id: privoxy-regression-test.pl,v 1.87 2013/01/06 18:16:10 fabiankeil Exp $ +# $Id: privoxy-regression-test.pl,v 1.88 2013/01/06 18:19:24 fabiankeil Exp $ # # Wish list: # @@ -1553,17 +1553,16 @@ sub log_result ($$) { my $result = shift; my $number = shift; - my $message = ''; - - $message .= interpret_result($result); - $message .= " for test "; - $message .= $number; - $message .= '/'; - $message .= $test->{'number'}; - $message .= '/'; - $message .= $test->{'section-id'}; - $message .= '/'; - $message .= $test->{'regression-test-id'}; + my $message = sprintf("%s for test %d", + interpret_result($result), + $test->{'number'}); + + if (cli_option_is_set('verbose')) { + $message = sprintf(" (%d/%d/%d)", $number, + $test->{'section-id'}, + $test->{'regression-test-id'}); + } + $message .= '.'; if ($verbose_test_description) {