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 <0intro@gmail.com>
Reviewed-by: Daniel Martà <mvdan@mvdan.cc>
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
if err := ioutil.WriteFile(htmlHTML, out.Bytes(), 0644); err != nil {
t.Fatal(err)
}
+ diff := "diff"
+ if runtime.GOOS == "plan9" {
+ diff = "/bin/ape/diff"
+ }
// diff -uw testdata/html/html.html testdata/html/html.golden
- cmd = exec.Command("diff", "-u", "-w", htmlHTML, htmlGolden)
+ cmd = exec.Command(diff, "-u", "-w", htmlHTML, htmlGolden)
run(cmd, t)
}