mirror of
https://github.com/wader/fq.git
synced 2024-11-26 21:55:57 +03:00
21 lines
384 B
Go
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())
|
|
}
|