summaryrefslogtreecommitdiff
path: root/selftest/Subunit.pm
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2010-08-26 03:50:08 +0200
committerJelmer Vernooij <jelmer@samba.org>2010-08-26 04:04:37 +0200
commit3c7a7bbb9a6258744523f41935f3967e48056787 (patch)
treefab3ee5f6e950a11d7a8316a4f50c9eb3ac3de6e /selftest/Subunit.pm
parente260965929563daad9464c599732b2ab358c9dc5 (diff)
downloadsamba-3c7a7bbb9a6258744523f41935f3967e48056787.tar.gz
samba-3c7a7bbb9a6258744523f41935f3967e48056787.tar.bz2
samba-3c7a7bbb9a6258744523f41935f3967e48056787.zip
subunit: Make sure "]" in failure reason ends up on its own line, so the
next subunit parser in the line parses it correctly.
Diffstat (limited to 'selftest/Subunit.pm')
-rw-r--r--selftest/Subunit.pm9
1 files changed, 5 insertions, 4 deletions
diff --git a/selftest/Subunit.pm b/selftest/Subunit.pm
index 42a9ad08aa..d5c8277fca 100644
--- a/selftest/Subunit.pm
+++ b/selftest/Subunit.pm
@@ -52,8 +52,8 @@ sub parse_results($$$)
unless ($terminated) {
$statistics->{TESTS_ERROR}++;
- $msg_ops->end_test($testname, "error", 1,
- "reason ($result) interrupted");
+ $msg_ops->end_test($testname, "error", 1,
+ "reason ($result) interrupted\n");
return 1;
}
}
@@ -102,7 +102,7 @@ sub parse_results($$$)
while ($#$open_tests+1 > 0) {
$msg_ops->end_test(pop(@$open_tests), "error", 1,
- "was started but never finished!");
+ "was started but never finished!\n");
$statistics->{TESTS_ERROR}++;
}
@@ -132,7 +132,8 @@ sub end_test($$;$)
my $reason = shift;
if ($reason) {
print "$result: $name [\n";
- print "$reason";
+ print $reason;
+ if (substr($reason, -1, 1) != "\n") { print "\n"; }
print "]\n";
} else {
print "$result: $name\n";