mirror of https://github.com/tidwall/tile38.git
17 lines
248 B
Go
17 lines
248 B
Go
|
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")
|
||
|
}
|
||
|
}
|