summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2001-06-16 18:34:30 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2001-06-16 18:34:30 +0000
commit908801fe7019314da9ec6cbe0d45f36d440c0aea (patch)
treeba68fcb64855612da505c164db6124a7fd54e9c6 /t
parentb637ffadabdd74cf3d1ad745a96611c427d33ba5 (diff)
downloadperl-908801fe7019314da9ec6cbe0d45f36d440c0aea.tar.gz
Make the code even more dynamical so that testname
suffix length can change. p4raw-id: //depot/perl@10638
Diffstat (limited to 't')
-rwxr-xr-xt/TEST17
1 files changed, 10 insertions, 7 deletions
diff --git a/t/TEST b/t/TEST
index 5cd1927cac..148e9bd74a 100755
--- a/t/TEST
+++ b/t/TEST
@@ -115,14 +115,17 @@ EOT
$total = @tests;
$files = 0;
$totmax = 0;
- $maxlen = 0;
- foreach (@tests) {
- $len = length;
- $maxlen = $len if $len > $maxlen;
+ 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;
}
- # +3 : we want three dots between the test name and the "ok"
- # -2 : the .t suffix
- $dotdotdot = $maxlen + 3 - 2;
+ # + 3 : we want three dots between the test name and the "ok"
+ $dotdotdot = $maxlen + 3 - $maxsuflen;
while ($test = shift @tests) {
if ( $infinite{$test} && $type eq 'compile' ) {