Initial working version

This commit is contained in:
Laurence Withers 2024-02-18 10:31:14 +00:00
commit 5ea0bbfc87
11 changed files with 648 additions and 1 deletions

21
attr_test.go Normal file
View file

@ -0,0 +1,21 @@
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")
}
}