MCPcopy
hub / github.com/charmbracelet/log / TestPrint

Function TestPrint

pkg_test.go:77–90  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

75}
76
77func TestPrint(t *testing.T) {
78 var buf bytes.Buffer
79 w := colorprofile.NewWriter(&buf, os.Environ())
80 w.Profile = colorprofile.ANSI
81 SetOutput(w)
82 SetLevel(FatalLevel)
83 SetTimeFunction(_zeroTime)
84 SetReportTimestamp(true)
85 SetReportCaller(false)
86 SetTimeFormat(DefaultTimeFormat)
87 Error("error")
88 Print("print")
89 assert.Equal(t, "0002/01/01 00:00:00 print\n", buf.String())
90}
91
92func TestPrintf(t *testing.T) {
93 var buf bytes.Buffer

Callers

nothing calls this directly

Calls 9

SetOutputFunction · 0.85
SetLevelFunction · 0.85
SetTimeFunctionFunction · 0.85
SetReportTimestampFunction · 0.85
SetReportCallerFunction · 0.85
SetTimeFormatFunction · 0.85
ErrorFunction · 0.85
PrintFunction · 0.85
StringMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…