diff --git a/controller/log/log_test.go b/controller/log/log_test.go new file mode 100644 index 00000000..8be0fcb7 --- /dev/null +++ b/controller/log/log_test.go @@ -0,0 +1,16 @@ +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") + } +}