summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorRobin Barker <RMBarker@cpan.org>2001-10-05 19:20:44 +0100
committerJarkko Hietaniemi <jhi@iki.fi>2001-10-05 16:28:37 +0000
commit73ddec28c1d4631f79a3149320fdaa9f3027d705 (patch)
tree99560eaf689f0e11871adce9f96fa47b116359ed /t
parentbc128d2952f90d40a463f42c5774a7d86be21f10 (diff)
downloadperl-73ddec28c1d4631f79a3149320fdaa9f3027d705.tar.gz
Re: test names from C<make TEST>
Message-Id: <200110051720.SAA17023@tempest.npl.co.uk> p4raw-id: //depot/perl@12342
Diffstat (limited to 't')
-rwxr-xr-xt/TEST25
1 files changed, 13 insertions, 12 deletions
diff --git a/t/TEST b/t/TEST
index e455043942..dec85ccb12 100755
--- a/t/TEST
+++ b/t/TEST
@@ -76,8 +76,9 @@ unless (@ARGV) {
$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 @@ EOT
$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 @@ EOT
next;
}
}
- $te = $test;
- $te =~ s/\.\w+$/./;
+ $te = $name{$test};
print "$te" . '.' x ($dotdotdot - length($te));
$test = $OVER{$test} if exists $OVER{$test};