blob: 7b93d6dce98bc7edcb40d216de1776088f7fc7d5 [file] [log] [blame]
Serge Bazanskiab4ef132021-09-24 13:58:13 +02001package gotoolchain
2
3import (
4 "os"
5 "os/exec"
6 "path"
7 "testing"
8)
9
10func 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
17func 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}