summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2002-01-28 23:15:22 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2002-01-28 23:15:22 +0000
commite2c38acd50687b4f8312524543d05a81d8096797 (patch)
tree7dcd386d36e0c9db71317c373156e756edb7e077 /t
parentbc4078bbbe6015a21aa6e05dd0cd361e1f6eb0ae (diff)
downloadperl-e2c38acd50687b4f8312524543d05a81d8096797.tar.gz
Prettier printing from Michael Schwern.
p4raw-id: //depot/perl@14484
Diffstat (limited to 't')
-rw-r--r--t/test.pl6
1 files changed, 5 insertions, 1 deletions
diff --git a/t/test.pl b/t/test.pl
index a00dd5ea46..e7376653b2 100644
--- a/t/test.pl
+++ b/t/test.pl
@@ -453,7 +453,11 @@ sub _fresh_perl {
print STDERR "# STATUS: $status\n";
}
- ($name) = $prog =~ /^(.{1,35})/ unless $name;
+ # Use the first line of the program as a name if none was given
+ unless( $name ) {
+ ($first_line, $name) = $prog =~ /^((.{1,50}).*)/;
+ $name .= '...' if length $first_line > length $name;
+ }
_ok($pass, _where(), "fresh_perl - $name");
}