Add a regression test.

This commit is contained in:
Max Schaefer
2020-08-10 14:48:13 +01:00
parent c2a26f8ec9
commit 9385857c39

View File

@@ -14,3 +14,10 @@ func test3(r io.Reader) {
data, _ := ioutil.ReadAll(r)
ignore(make([]byte, len(data)+1)) // NOT OK
}
func test4(r io.Reader, ws []io.Writer) {
mw := io.MultiWriter(ws...)
ignore(make([]error, len(ws)+1)) // OK
data, _ := ioutil.ReadAll(r)
mw.Write(data)
}