MCPcopy
hub / github.com/pterm/pterm / TestPrefixPrinterWithoutPrefix

Function TestPrefixPrinterWithoutPrefix

prefix_printer_test.go:128–142  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

126}
127
128func TestPrefixPrinterWithoutPrefix(t *testing.T) {
129 pterm.DisableStyling()
130 for _, p := range prefixPrinters {
131 p2 := p.WithPrefix(pterm.Prefix{})
132 t.Run("", func(t *testing.T) {
133 for _, printable := range printables {
134 ret := captureStdout(func(w io.Writer) {
135 p2.WithWriter(w).Print(printable)
136 })
137 testza.AssertEqual(t, ret, fmt.Sprint(printable))
138 }
139 })
140 }
141 pterm.EnableStyling()
142}
143
144func TestSprintfWithNewLineEnding(t *testing.T) {
145 for _, p := range prefixPrinters {

Callers

nothing calls this directly

Calls 7

DisableStylingFunction · 0.92
EnableStylingFunction · 0.92
captureStdoutFunction · 0.85
WithPrefixMethod · 0.80
PrintMethod · 0.65
SprintMethod · 0.65
WithWriterMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…