Skip to content

Commit abeac09

Browse files
committed
cmd/cover: fix TestCoverHTML on Plan 9
CL 116975 added TestCoverHTML. However, this test is failing on Plan 9, because the GNU diff tool is called "ape/diff" instead of "diff" on Plan 9. This change replaces the "diff" command by the "ape/diff" command on Plan 9. Fixes #25795. Change-Id: I15b49868cd09f3f977aa13fffdfc430c882bf757 Reviewed-on: https://go-review.googlesource.com/117415 Run-TryBot: David du Colombier <[email protected]> Reviewed-by: Daniel Martí <[email protected]> Reviewed-by: Alex Brainman <[email protected]> TryBot-Result: Gobot Gobot <[email protected]>
1 parent 29e5a81 commit abeac09

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/cmd/cover/cover_test.go

+5-1
Original file line numberDiff line numberDiff line change
@@ -310,8 +310,12 @@ func TestCoverHTML(t *testing.T) {
310310
if err := ioutil.WriteFile(htmlHTML, out.Bytes(), 0644); err != nil {
311311
t.Fatal(err)
312312
}
313+
diff := "diff"
314+
if runtime.GOOS == "plan9" {
315+
diff = "/bin/ape/diff"
316+
}
313317
// diff -uw testdata/html/html.html testdata/html/html.golden
314-
cmd = exec.Command("diff", "-u", "-w", htmlHTML, htmlGolden)
318+
cmd = exec.Command(diff, "-u", "-w", htmlHTML, htmlGolden)
315319
run(cmd, t)
316320
}
317321

0 commit comments

Comments
 (0)