mirror of
https://github.com/wader/fq.git
synced 2024-11-25 23:13:19 +03:00
21 lines
383 B
Go
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())
|
|
}
|