Commit 26301b6c authored by Dave Cheney's avatar Dave Cheney

cmd/cover: fix missing error check in test

Fix missing error check in test.

Spotted by Gordon Klass, https://groups.google.com/forum/#!topic/golang-nuts/MdDLbvOjb4o

Change-Id: I22f1a438cbb60a2fe1740fc2d43fbf8aa008b6de
Reviewed-on: https://go-review.googlesource.com/10605Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
parent f04e7bb1
......@@ -59,7 +59,9 @@ func TestCover(t *testing.T) {
for i, line := range lines {
lines[i] = bytes.Replace(line, []byte("LINE"), []byte(fmt.Sprint(i+1)), -1)
}
err = ioutil.WriteFile(coverInput, bytes.Join(lines, []byte("\n")), 0666)
if err := ioutil.WriteFile(coverInput, bytes.Join(lines, []byte("\n")), 0666); err != nil {
t.Fatal(err)
}
// defer removal of test_line.go
if !debug {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment