If a test fails with non-zero status, but some stdout output has been
already captured, print it. Otherwise this information is irretrievably
lost.