summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYves Orton <demerphq@gmail.com>2012-02-19 21:04:44 +0100
committerKarl Williamson <public@khwilliamson.com>2012-03-16 14:28:42 -0600
commit1860005f96f0fe344aec54baccaf0d8b33cb1d3f (patch)
treef67ca04d190511930b0865f7ff1c5d3ed2150c85
parent6329003cd882963712174461f03a3f11db150a50 (diff)
downloadperl-1860005f96f0fe344aec54baccaf0d8b33cb1d3f.tar.gz
make test.pl show test number and name in failure diagnostics output
The old output would show only the line number as diagnostics but not the test number, nor the test name, which often contains very useful information. This patch makes sure this is visible in the diagnostics output of test failures.
-rw-r--r--t/test.pl5
1 files changed, 1 insertions, 4 deletions
diff --git a/t/test.pl b/t/test.pl
index b33c634fef..604cdda80f 100644
--- a/t/test.pl
+++ b/t/test.pl
@@ -210,10 +210,7 @@ sub _ok {
note @mess; # Ensure that the message is properly escaped.
}
else {
- my $msg = "# Failed test $test - ";
- $msg.= "$name " if $name;
- $msg .= "$where\n";
- _diag $msg;
+ _diag "# Failed test $test - $name $where\n";
_diag @mess;
}