From 00d2a195547f639b631f95431edc1484a0acd9de Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Tue, 2 Oct 2007 15:53:26 +0000 Subject: r25465: improve plain output... metze (This used to be commit 8deb2f068c7574618467859d9335fbd1ca6e49a1) --- source4/selftest/output/plain.pm | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) (limited to 'source4/selftest') 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($) -- cgit v1.2.3