mirror of https://github.com/tidwall/tile38.git
added log test
This commit is contained in:
parent
02ff2a70bf
commit
388409072c
|
@ -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")
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue