diff options
author | Ayke van Laethem <[email protected]> | 2024-10-30 09:50:57 +0100 |
---|---|---|
committer | Ayke <[email protected]> | 2024-11-01 08:49:00 +0100 |
commit | 4b706ae25c2ab52f0aabdb78baeaef4cdcf3578c (patch) | |
tree | 7220f7831d5f642b0a76c894af13a9584948cadf | |
parent | 1ac26d3d2ffb201e820a024ccbe47b71430de96e (diff) | |
download | tinygo-4b706ae25c2ab52f0aabdb78baeaef4cdcf3578c.tar.gz tinygo-4b706ae25c2ab52f0aabdb78baeaef4cdcf3578c.zip |
test: show output even when a test binary didn't exit cleanly
This was a problem on wasm, where node would exit with a non-zero exit
code when there was a panic.
-rw-r--r-- | main_test.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/main_test.go b/main_test.go index 14b3d1809..723a52267 100644 --- a/main_test.go +++ b/main_test.go @@ -429,6 +429,9 @@ func runTestWithConfig(name string, t *testing.T, options compileopts.Options, c for _, line := range strings.Split(strings.TrimRight(w.String(), "\n"), "\n") { t.Log(line) } + if stdout.Len() != 0 { + t.Logf("output:\n%s", stdout.String()) + } t.Fail() return } |