MCPcopy Create free account
hub / github.com/ddev/ddev / TestCaptureUserOut

Function TestCaptureUserOut

pkg/util/utils_test.go:95–103  ·  view source on GitHub ↗

TestCaptureUserOut ensures capturing of stdout works as expected.

(t *testing.T)

Source from the content-addressed store, hash-verified

93
94// TestCaptureUserOut ensures capturing of stdout works as expected.
95func TestCaptureUserOut(t *testing.T) {
96 assert := asrt.New(t)
97 restoreOutput := util.CaptureUserOut()
98 text := util.RandString(128)
99 output.UserOut.Println(text)
100 out := restoreOutput()
101
102 assert.Contains(out, text)
103}
104
105// TestCaptureStdOut ensures capturing of stdout works as expected.
106func TestCaptureStdOut(t *testing.T) {

Callers

nothing calls this directly

Calls 2

CaptureUserOutFunction · 0.92
RandStringFunction · 0.92

Tested by

no test coverage detected