In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/ffb73d652a484e55333d3bfab58687234ac784fb?hp=12a680b783014913cce47bdc06914d345a95240a>
- Log ----------------------------------------------------------------- commit ffb73d652a484e55333d3bfab58687234ac784fb Author: Craig A. Berry <[email protected]> Date: Wed Mar 7 07:12:00 2012 -0600 fix warning in test.pl diagnostics output. 2f137bbd018b assumed that $name is always defined, but it isn't always, and when it's not the resulting undefined value warning could corrupt test output and even make TODO tests trigger failure with "unexpected output at test 0." ----------------------------------------------------------------------- Summary of changes: t/test.pl | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/t/test.pl b/t/test.pl index 604cdda..b33c634 100644 --- a/t/test.pl +++ b/t/test.pl @@ -210,7 +210,10 @@ sub _ok { note @mess; # Ensure that the message is properly escaped. } else { - _diag "# Failed test $test - $name $where\n"; + my $msg = "# Failed test $test - "; + $msg.= "$name " if $name; + $msg .= "$where\n"; + _diag $msg; _diag @mess; } -- Perl5 Master Repository
