diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2002-01-28 23:15:22 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2002-01-28 23:15:22 +0000 |
commit | e2c38acd50687b4f8312524543d05a81d8096797 (patch) | |
tree | 7dcd386d36e0c9db71317c373156e756edb7e077 /t | |
parent | bc4078bbbe6015a21aa6e05dd0cd361e1f6eb0ae (diff) | |
download | perl-e2c38acd50687b4f8312524543d05a81d8096797.tar.gz |
Prettier printing from Michael Schwern.
p4raw-id: //depot/perl@14484
Diffstat (limited to 't')
-rw-r--r-- | t/test.pl | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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"); } |