journal/attr_test.go

22 lines
370 B
Go
Raw Permalink Normal View History

2024-02-18 10:31:14 +00:00
package journal
import "testing"
func TestAttrTextProtoOK(t *testing.T) {
a := Attr{
Value: []byte("hello, world!"),
}
if !a.UseTextProto() {
t.Error("UseTextProto returned false")
}
}
func TestAttrTextProtoNewline(t *testing.T) {
a := Attr{
Value: []byte("hello, brave new\nworld!"),
}
if a.UseTextProto() {
t.Error("UseTextProto returned true")
}
}