1
1
mirror of https://github.com/wader/fq.git synced 2024-12-18 10:52:44 +03:00
fq/internal/asciiwriter/asciiwriter_test.go

21 lines
384 B
Go
Raw Normal View History

2020-06-08 03:29:51 +03:00
package asciiwriter_test
import (
"bytes"
"log"
"testing"
"github.com/wader/fq/internal/asciiwriter"
2020-06-08 03:29:51 +03:00
)
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())
}