aboutsummaryrefslogtreecommitdiff
path: root/src/cmd
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd')
-rw-r--r--src/cmd/cover/cover_test.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/cmd/cover/cover_test.go b/src/cmd/cover/cover_test.go
index 3de9b0c12d..f002442b63 100644
--- a/src/cmd/cover/cover_test.go
+++ b/src/cmd/cover/cover_test.go
@@ -448,6 +448,10 @@ func TestHtmlUnformatted(t *testing.T) {
t.Fatal(err)
}
+ if err := ioutil.WriteFile(filepath.Join(htmlUDir, "go.mod"), []byte("module htmlunformatted\n"), 0444); err != nil {
+ t.Fatal(err)
+ }
+
const htmlUContents = `
package htmlunformatted
@@ -475,6 +479,7 @@ lab:
// testcover -html TMPDIR/htmlunformatted.cov -o unformatted.html
cmd = exec.Command(testcover, "-html", htmlUProfile, "-o", htmlUHTML)
+ cmd.Dir = htmlUDir
run(cmd, t)
}