diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2001-06-16 18:34:30 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-06-16 18:34:30 +0000 |
commit | 908801fe7019314da9ec6cbe0d45f36d440c0aea (patch) | |
tree | ba68fcb64855612da505c164db6124a7fd54e9c6 /t | |
parent | b637ffadabdd74cf3d1ad745a96611c427d33ba5 (diff) | |
download | perl-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-x | t/TEST | 17 |
1 files changed, 10 insertions, 7 deletions
@@ -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' ) { |