MCPcopy
hub / github.com/pterm/pterm / testPrintflnContains

Function testPrintflnContains

utils_test.go:73–84  ·  view source on GitHub ↗

testPrintflnContains can be used to test Printfln methods.

(t *testing.T, logic func(w io.Writer, format string, a any))

Source from the content-addressed store, hash-verified

71
72// testPrintflnContains can be used to test Printfln methods.
73func testPrintflnContains(t *testing.T, logic func(w io.Writer, format string, a any)) {
74 for _, printable := range printables {
75 t.Run(fmt.Sprint(printable), func(t *testing.T) {
76 testPrintfContains(t, logic)
77 })
78 pterm.DisableStyling()
79 t.Run(fmt.Sprint(printable), func(t *testing.T) {
80 testPrintfContains(t, logic)
81 })
82 pterm.EnableStyling()
83 }
84}
85
86// testPrintlnContains can be used to test Println methods.
87func testPrintlnContains(t *testing.T, logic func(w io.Writer, a any)) {

Calls 4

DisableStylingFunction · 0.92
EnableStylingFunction · 0.92
testPrintfContainsFunction · 0.85
SprintMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…