tile38/controller/log/log_test.go

17 lines
248 B
Go
Raw Normal View History

2016-07-12 19:07:28 +03:00
package log
import (
"bytes"
"strings"
"testing"
)
func TestLog(t *testing.T) {
f := &bytes.Buffer{}
Default = New(f, &Config{})
Printf("hello %v", "everyone")
if !strings.HasSuffix(f.String(), "hello everyone\n") {
t.Fatal("fail")
}
}