MCPcopy
hub / github.com/perkeep/perkeep / TestTLog

Function TestTLog

pkg/test/test_test.go:36–53  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

34}
35
36func TestTLog(t *testing.T) {
37 tb := new(tbLogger)
38 defer TLog(tb)()
39 defer log.SetFlags(log.Flags())
40 log.SetFlags(0)
41
42 log.Printf("hello")
43 log.Printf("hello\n")
44 log.Printf("some text\nand more text\n")
45 want := []string{
46 "hello",
47 "hello",
48 "some text\nand more text",
49 }
50 if !reflect.DeepEqual(tb.log, want) {
51 t.Errorf("Got %q; want %q", tb.log, want)
52 }
53}

Callers

nothing calls this directly

Calls 2

TLogFunction · 0.85
PrintfMethod · 0.80

Tested by

no test coverage detected