Microblog: TestMain can cause one to question reality
A debugging story about a Go test suite failing silently due to a commented-out line in TestMain, causing confusion and a frantic search for the bug.
A debugging story about a Go test suite failing silently due to a commented-out line in TestMain, causing confusion and a frantic search for the bug.
Explains why Go's 'go test' command doesn't wait for interactive stdin input and provides a solution using io.Pipe for testing.
Explains the Go 1.14 improvement where `go test -v` streams `t.Log` output in real-time, aiding debugging of long-running tests.
A beginner's guide to writing and running unit tests in the Go programming language, covering the built-in `go test` tool and basic test structure.