Add some stdcopy_test (coverage)

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
This commit is contained in:
Vincent Demeester 2015-04-16 14:17:23 +02:00
parent b140321e2e
commit 3cc15b53e7
2 changed files with 65 additions and 4 deletions

View file

@ -54,10 +54,6 @@ func (w *StdWriter) Write(buf []byte) (n int, err error) {
// `t` indicates the id of the stream to encapsulate.
// It can be stdcopy.Stdin, stdcopy.Stdout, stdcopy.Stderr.
func NewStdWriter(w io.Writer, t StdType) *StdWriter {
if len(t) != StdWriterPrefixLen {
return nil
}
return &StdWriter{
Writer: w,
prefix: t,