aboutsummaryrefslogtreecommitdiff
path: root/git-codereview/util_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'git-codereview/util_test.go')
-rw-r--r--git-codereview/util_test.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/git-codereview/util_test.go b/git-codereview/util_test.go
index fd419a2..2d3bebe 100644
--- a/git-codereview/util_test.go
+++ b/git-codereview/util_test.go
@@ -324,6 +324,8 @@ func testMain(t *testing.T, args ...string) {
mainCanDie = false // reset for next invocation
defer func() {
+ t.Helper()
+
runLog = runLogTrap
testStdout = stdoutTrap
testStderr = stderrTrap
@@ -344,6 +346,13 @@ func testMain(t *testing.T, args ...string) {
}
t.Fatalf("%s\nstdout:\n%sstderr:\n%s", msg, testStdout, testStderr)
}
+
+ if testStdout.Len() > 0 {
+ t.Logf("stdout:\n%s", testStdout)
+ }
+ if testStderr.Len() > 0 {
+ t.Logf("stderr:\n%s", testStderr)
+ }
}()
exitTrap = func() {