mirror of
https://github.com/golang/go
synced 2024-11-18 20:24:41 -07:00
cmd/godoc: Fix reg test on Windows.
R=bradfitz, gri CC=golang-dev https://golang.org/cl/11551043
This commit is contained in:
parent
705bb7ffce
commit
0160160d5e
@ -10,6 +10,7 @@ import (
|
|||||||
"os/exec"
|
"os/exec"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"regexp"
|
"regexp"
|
||||||
|
"runtime"
|
||||||
"testing"
|
"testing"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -42,6 +43,9 @@ func TestGodoc(t *testing.T) {
|
|||||||
defer os.RemoveAll(tmp)
|
defer os.RemoveAll(tmp)
|
||||||
|
|
||||||
bin := filepath.Join(tmp, "godoc")
|
bin := filepath.Join(tmp, "godoc")
|
||||||
|
if runtime.GOOS == "windows" {
|
||||||
|
bin += ".exe"
|
||||||
|
}
|
||||||
cmd := exec.Command("go", "build", "-o", bin)
|
cmd := exec.Command("go", "build", "-o", bin)
|
||||||
if err := cmd.Run(); err != nil {
|
if err := cmd.Run(); err != nil {
|
||||||
t.Fatalf("Building godoc: %v", err)
|
t.Fatalf("Building godoc: %v", err)
|
||||||
|
Loading…
Reference in New Issue
Block a user