(t *testing.T)
| 306 | } |
| 307 | |
| 308 | func TestReader_ReadStringInto_Error(t *testing.T) { |
| 309 | r := proto.NewReader(bytes.NewReader([]byte("-ERR something bad\r\n"))) |
| 310 | buf := make([]byte, 16) |
| 311 | _, err := r.ReadStringInto(buf) |
| 312 | if err == nil { |
| 313 | t.Fatal("expected error, got nil") |
| 314 | } |
| 315 | if err == proto.Nil { |
| 316 | t.Fatalf("got proto.Nil, want ERR") |
| 317 | } |
| 318 | } |
| 319 | |
| 320 | func TestReader_ReadStringInto_BufferTooSmall(t *testing.T) { |
| 321 | // Feed two consecutive bulk-string replies. The first read uses a |
nothing calls this directly
no test coverage detected
searching dependent graphs…