(t *testing.T)
| 53 | } |
| 54 | |
| 55 | func TestDecodeSimpleRequest2(t *testing.T) { |
| 56 | test := []string{ |
| 57 | "hello world\r\n", |
| 58 | "hello world \r\n", |
| 59 | " hello world \r\n", |
| 60 | " hello world\r\n", |
| 61 | " hello world \r\n", |
| 62 | } |
| 63 | for _, s := range test { |
| 64 | a, err := DecodeMultiBulkFromBytes([]byte(s)) |
| 65 | assert.MustNoError(err) |
| 66 | assert.Must(len(a) == 2) |
| 67 | assert.Must(bytes.Equal(a[0].Value, []byte("hello"))) |
| 68 | assert.Must(bytes.Equal(a[1].Value, []byte("world"))) |
| 69 | } |
| 70 | } |
| 71 | |
| 72 | func TestDecodeSimpleRequest3(t *testing.T) { |
| 73 | test := []string{"\r", "\n", " \n"} |
nothing calls this directly
no test coverage detected