Initial working version
This commit is contained in:
parent
3bf8ccebf8
commit
5ea0bbfc87
11 changed files with 648 additions and 1 deletions
21
attr_test.go
Normal file
21
attr_test.go
Normal 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")
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue