added log test

This commit is contained in:
Josh Baker 2016-07-12 10:07:28 -06:00
parent 02ff2a70bf
commit 388409072c
1 changed files with 16 additions and 0 deletions

View File

@ -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")
}
}