Fix buffer rewind at end of transmission
Change-Id: I5abb90153931574acf0df5e95e5b286c883539e5
diff --git a/token_writer_test.go b/token_writer_test.go
index 71524fb..291c3b9 100644
--- a/token_writer_test.go
+++ b/token_writer_test.go
@@ -49,4 +49,11 @@
matStr := w.String()
assert.Equal("This\n.\n\n0 4 4 5\nAnd\n.\n\n0 3 3 4\n", matStr)
+
+ w.Reset()
+ mat.TransduceTokenWriter(strings.NewReader("\nThis.\x0a\x04\nAnd.\n\x04\n"), tws)
+
+ matStr = w.String()
+ assert.Equal("This\n.\n\n1 5 5 6\nAnd\n.\n\n1 4 4 5\n", matStr)
+
}