1
1
mirror of https://github.com/wader/fq.git synced 2024-11-26 21:55:57 +03:00
fq/internal/asciiwriter/asciiwriter_test.go
2021-09-12 13:08:50 +02:00

21 lines
384 B
Go

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