summaryrefslogtreecommitdiff
path: root/xdelta3/go/src/xdelta/test.go
diff options
context:
space:
mode:
Diffstat (limited to 'xdelta3/go/src/xdelta/test.go')
-rw-r--r--xdelta3/go/src/xdelta/test.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/xdelta3/go/src/xdelta/test.go b/xdelta3/go/src/xdelta/test.go
index d11ec29..ab4137c 100644
--- a/xdelta3/go/src/xdelta/test.go
+++ b/xdelta3/go/src/xdelta/test.go
@@ -49,6 +49,7 @@ func (t *TestGroup) Drain(f io.ReadCloser, desc string) <-chan []byte {
49 49
50func (t *TestGroup) Empty(f io.ReadCloser, desc string) { 50func (t *TestGroup) Empty(f io.ReadCloser, desc string) {
51 t.Go(desc, func (g Goroutine) { 51 t.Go(desc, func (g Goroutine) {
52 g.OK()
52 s := bufio.NewScanner(f) 53 s := bufio.NewScanner(f)
53 for s.Scan() { 54 for s.Scan() {
54 os.Stderr.Write([]byte(fmt.Sprint(desc, ": ", s.Text(), "\n"))) 55 os.Stderr.Write([]byte(fmt.Sprint(desc, ": ", s.Text(), "\n")))
@@ -59,7 +60,6 @@ func (t *TestGroup) Empty(f io.ReadCloser, desc string) {
59 fmt.Println("Empty", desc, err) 60 fmt.Println("Empty", desc, err)
60 g.Panic(err) 61 g.Panic(err)
61 } 62 }
62 g.OK()
63 }) 63 })
64} 64}
65 65
@@ -126,7 +126,7 @@ func (t *TestGroup) CompareStreams(r1 io.ReadCloser, r2 io.ReadCloser, length in
126 }) 126 })
127} 127}
128 128
129func (t *TestGroup) Exec(p *Program, srcfifo bool, flags []string) (*Run, error) { 129func (t *TestGroup) Exec(desc string, p *Program, srcfifo bool, flags []string) (*Run, error) {
130 var err error 130 var err error
131 run := &Run{} 131 run := &Run{}
132 args := []string{p.Path} 132 args := []string{p.Path}
@@ -162,7 +162,7 @@ func (t *TestGroup) Exec(p *Program, srcfifo bool, flags []string) (*Run, error)
162 if serr := run.Cmd.Start(); serr != nil { 162 if serr := run.Cmd.Start(); serr != nil {
163 return nil, serr 163 return nil, serr
164 } 164 }
165 t.Go("exec-wait", func (g Goroutine) { 165 t.Go("exec-wait:" + desc, func (g Goroutine) {
166 if err := run.Cmd.Wait(); err != nil { 166 if err := run.Cmd.Wait(); err != nil {
167 g.Panic(err) 167 g.Panic(err)
168 } 168 }