1
1
mirror of https://github.com/wader/fq.git synced 2024-12-23 05:13:30 +03:00
fq/internal/hexpairwriter/hexpairwriter_test.go
2021-09-12 13:08:50 +02:00

21 lines
383 B
Go

package hexpairwriter_test
import (
"bytes"
"log"
"testing"
"github.com/wader/fq/internal/hexpairwriter"
)
func TestWrite(t *testing.T) {
b := &bytes.Buffer{}
h := hexpairwriter.New(b, 4, 0, hexpairwriter.Pair)
_, _ = h.Write([]byte(""))
_, _ = h.Write([]byte("ab"))
_, _ = h.Write([]byte("c"))
_, _ = h.Write([]byte("d"))
log.Printf("b.Bytes(): '%s'\n", b.Bytes())
}