mirror of
https://github.com/golang/go
synced 2024-11-18 08:24:44 -07:00
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/10605 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
parent
f04e7bb1cf
commit
26301b6cfd
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user