MCPcopy
hub / github.com/pterm/pterm / testEmpty

Function testEmpty

utils_test.go:187–194  ·  view source on GitHub ↗

testEmpty checks that a function does not return a string.

(t *testing.T, logic func(a any) string)

Source from the content-addressed store, hash-verified

185
186// testEmpty checks that a function does not return a string.
187func testEmpty(t *testing.T, logic func(a any) string) {
188 for _, printable := range printables {
189 testza.AssertZero(t, logic(printable))
190 pterm.DisableStyling()
191 testza.AssertZero(t, logic(printable))
192 pterm.EnableStyling()
193 }
194}
195
196// testDoesNotOutput can be used, to test that something does not output anything to stdout.
197func testDoesNotOutput(t *testing.T, logic func(w io.Writer)) {

Calls 2

DisableStylingFunction · 0.92
EnableStylingFunction · 0.92

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…