You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
411 B
Go
27 lines
411 B
Go
5 years ago
|
package blammo
|
||
|
|
||
|
import (
|
||
|
"bytes"
|
||
|
"testing"
|
||
|
"time"
|
||
|
)
|
||
|
|
||
|
func TestLineWriter(t *testing.T) {
|
||
|
var buf bytes.Buffer
|
||
|
w := NewLineWriter(&buf)
|
||
|
w.WriteEvent(&Event{
|
||
|
Level: Debug,
|
||
|
Time: time.Now(),
|
||
|
Path: NewPath("alice").Child("bob").Child("carol"),
|
||
|
Text: "hey you farthead",
|
||
|
Tags: &Tags{
|
||
|
key: "poop",
|
||
|
parent: &Tags{
|
||
|
key: "num_poops",
|
||
|
value: 27,
|
||
|
},
|
||
|
},
|
||
|
})
|
||
|
t.Error(buf.String())
|
||
|
}
|