package bytereader_test import ( "testing" "io" "sourcecode.social/reiver/go-bytereader" ) func TestNewByteReaderFromString(t *testing.T) { tests := []struct{ Value string }{ { Value: "", }, { Value: "apple", }, { Value: "banana", }, { Value: "cherry", }, { Value: "ONCE TWICE THRICE FOURCE", }, { Value: "۰۱۲۳۴۵۶۷۸۹", }, { Value: "😈 👹 😡", }, } testloop: for testNumber, test := range tests { var byteReader io.ByteReader = bytereader.NewByteReaderFromString(test.Value) var buffer [64]byte var p []byte = buffer[0:0] { length := len(test.Value) for i:=0; i