22 lines
370 B
Go
22 lines
370 B
Go
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")
|
|
}
|
|
}
|