Serge Bazanski | ab4ef13 | 2021-09-24 13:58:13 +0200 | [diff] [blame] | 1 | package gotoolchain |
| 2 | |
| 3 | import ( |
| 4 | "os" |
| 5 | "os/exec" |
| 6 | "path" |
| 7 | "testing" |
| 8 | ) |
| 9 | |
| 10 | func TestGoToolRuns(t *testing.T) { |
| 11 | cmd := exec.Command(Go, "version") |
| 12 | if out, err := cmd.CombinedOutput(); err != nil { |
| 13 | t.Fatalf("Failed to run `go version`: %q, %v", string(out), err) |
| 14 | } |
| 15 | } |
| 16 | |
| 17 | func TestGorootContainsRoot(t *testing.T) { |
| 18 | rootfile := path.Join(Root, "ROOT") |
| 19 | if _, err := os.Stat(rootfile); err != nil { |
| 20 | t.Fatalf("ROOT not found in %s", Root) |
| 21 | } |
| 22 | } |