MCPcopy
hub / github.com/pterm/pterm / testSprintlnContains

Function testSprintlnContains

utils_test.go:165–176  ·  view source on GitHub ↗

testSprintlnContains can be used to test Sprintln methods.

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

Source from the content-addressed store, hash-verified

163
164// testSprintlnContains can be used to test Sprintln methods.
165func testSprintlnContains(t *testing.T, logic func(a any) string) {
166 for _, printable := range printables {
167 t.Run(fmt.Sprint(printable), func(t *testing.T) {
168 testSprintContains(t, logic)
169 })
170 pterm.DisableStyling()
171 t.Run(fmt.Sprint(printable), func(t *testing.T) {
172 testSprintContains(t, logic)
173 })
174 pterm.EnableStyling()
175 }
176}
177
178// testDoesOutput can be used to test if something is outputted to stdout.
179func testDoesOutput(t *testing.T, logic func(w io.Writer)) {

Calls 4

DisableStylingFunction · 0.92
EnableStylingFunction · 0.92
testSprintContainsFunction · 0.85
SprintMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…