(t *testing.T)
| 23 | } |
| 24 | |
| 25 | func TestOutput(t *testing.T) { |
| 26 | buf := new(bytes.Buffer) |
| 27 | log.SetOutput(buf) |
| 28 | Level = LevelDebug |
| 29 | output(LevelDebug, nil) |
| 30 | |
| 31 | // outputf correctly prints string with proper Debug prefix |
| 32 | if !strings.Contains(buf.String(), levelPrefix[LevelDebug]) { |
| 33 | t.Fail() |
| 34 | } |
| 35 | return |
| 36 | } |
| 37 | |
| 38 | func TestCriticalf(t *testing.T) { |
| 39 | buf := new(bytes.Buffer) |