summaryrefslogtreecommitdiff
path: root/source4/selftest
diff options
context:
space:
mode:
Diffstat (limited to 'source4/selftest')
-rw-r--r--source4/selftest/output/plain.pm21
1 files changed, 13 insertions, 8 deletions
diff --git a/source4/selftest/output/plain.pm b/source4/selftest/output/plain.pm
index 12236e518f..e4abb2d05a 100644
--- a/source4/selftest/output/plain.pm
+++ b/source4/selftest/output/plain.pm
@@ -81,16 +81,21 @@ sub start_test($$)
sub end_test($$$$$$)
{
my ($self, $state, $testname, $result, $unexpected, $reason) = @_;
+ my $append = "";
- if ($unexpected and $self->{immediate} and not $self->{verbose}) {
- if ($reason) {
- print "$testname: $result [ $reason ]\n";
- } else {
- print "$testname: $result\n";
- }
- print $self->{test_output}->{$state->{NAME}}."\n";
+ unless ($unexpected) {
+ $self->{test_output}->{$state->{NAME}} = "";
+ return;
+ }
+
+ $append = "UNEXPECTED($result): $testname\n";
+
+ $self->{test_output}->{$state->{NAME}} .= $append;
+
+ if ($self->{immediate} and not $self->{verbose}) {
+ print $self->{test_output}->{$state->{NAME}};
+ $self->{test_output}->{$state->{NAME}} = "";
}
- $self->{test_output}->{$state->{NAME}} = "";
}
sub summary($)