Change 12342 by jhi@alpha on 2001/10/05 16:28:37
Subject: [PATCH perl@12307] Re: test names from C<make TEST>
From: Robin Barker <[EMAIL PROTECTED]>
Date: Fri, 5 Oct 2001 18:20:44 +0100 (BST)
Message-Id: <[EMAIL PROTECTED]>
Affected files ...
... //depot/perl/t/TEST#53 edit
Differences ...
==== //depot/perl/t/TEST#53 (xtext) ====
Index: perl/t/TEST
--- perl/t/TEST.~1~ Fri Oct 5 10:45:05 2001
+++ perl/t/TEST Fri Oct 5 10:45:05 2001
@@ -76,8 +76,9 @@
$t = $1;
if (!$core || $t =~ m!^lib/[a-z]!)
{
- push @ARGV, $t;
- $OVER{$t} = File::Spec->catdir($updir, $t);
+ $path = File::Spec->catdir($updir, $t);
+ push @ARGV, $path;
+ $name{$path} = $t;
}
}
}
@@ -122,17 +123,18 @@
$total = @tests;
$files = 0;
$totmax = 0;
+
+ foreach (@tests) {
+ $name{$_} = File::Spec->catdir('t',$_) unless exists $name{$_};
+ }
my $maxlen = 0;
- my $maxsuflen = 0;
- foreach (@tests) { # The same code in lib/Test/Harness.pm:_run_all_tests
- my $suf = /\.(\w+)$/ ? $1 : '';
- my $len = length;
- my $suflen = length $suf;
- $maxlen = $len if $len > $maxlen;
- $maxsuflen = $suflen if $suflen > $maxsuflen;
+ foreach (@name{@tests}) {
+ s/\.\w+\z/./;
+ my $len = length ;
+ $maxlen = $len if $len > $maxlen;
}
# + 3 : we want three dots between the test name and the "ok"
- $dotdotdot = $maxlen + 3 - $maxsuflen;
+ $dotdotdot = $maxlen + 3 ;
while ($test = shift @tests) {
if ( $infinite{$test} && $type eq 'compile' ) {
@@ -152,8 +154,7 @@
next;
}
}
- $te = $test;
- $te =~ s/\.\w+$/./;
+ $te = $name{$test};
print "$te" . '.' x ($dotdotdot - length($te));
$test = $OVER{$test} if exists $OVER{$test};
End of Patch.