From: Ilya Zakharevich Date: Tue, 29 May 2001 03:50:18 +0000 (-0400) Subject: Re: [PATCH 5.6.1] Test::Harness clumsy X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=ac7d80cddc7c44568456717db7f50a43c2841592;p=p5sagit%2Fp5-mst-13.2.git Re: [PATCH 5.6.1] Test::Harness clumsy Message-ID: <20010529035018.A9387@math.ohio-state.edu> p4raw-id: //depot/perl@10280 --- diff --git a/lib/Test/Harness.pm b/lib/Test/Harness.pm index 73f3f79..81a9fb5 100644 --- a/lib/Test/Harness.pm +++ b/lib/Test/Harness.pm @@ -35,7 +35,7 @@ my $Files_In_Dir = $ENV{HARNESS_FILELEAK_IN_DIR}; $Verbose = 0; $Switches = "-w"; $Columns = $ENV{HARNESS_COLUMNS} || $ENV{COLUMNS} || 80; - +$Columns--; # Do no write into the last column sub globdir { opendir DIRH, shift; my @f = readdir DIRH; closedir DIRH; @f } @@ -506,7 +506,7 @@ sub _garbled_output { sub _create_fmts { my($failedtests) = @_; - my $failed_str = "Failed Test"; + my $failed_str = "Failed Test "; # Borrow up to 3 chars from Status my $middle_str = " Status Wstat Total Fail Failed "; my $list_str = "List of Failed"; @@ -527,8 +527,9 @@ sub _create_fmts { } } + my $failed_len = $max_namelen - 3; my $fmt_top = "format STDOUT_TOP =\n" - . sprintf("%-${max_namelen}s", $failed_str) + . sprintf("%-${failed_len}s", "Failed Test") . $middle_str . $list_str . "\n" . "-" x $Columns @@ -536,7 +537,7 @@ sub _create_fmts { my $fmt = "format STDOUT =\n" . "@" . "<" x ($max_namelen - 1) - . " @>> @>>>> @>>>> @>>> ^##.##% " + . " @>> @>>>> @>>>> @>>> ^##.##% " . "^" . "<" x ($list_len - 1) . "\n" . '{ $Curtest->{name}, $Curtest->{estat},' . ' $Curtest->{wstat}, $Curtest->{max},'