1
0
mirror of https://github.com/golang/go synced 2024-11-17 19:04:47 -07:00

cmd/go: convert TestIssue11709 to the script framework

Part of converting all tests to script framework to improve
test parallelism.

Updates #36320
Updates #17751

Change-Id: I16fb0910196c96caef6ed380f96010a548407f9e
Reviewed-on: https://go-review.googlesource.com/c/go/+/214424
Reviewed-by: Bryan C. Mills <bcmills@google.com>
This commit is contained in:
Michael Matloob 2020-01-13 10:51:28 -05:00
parent 635f4b903a
commit e5f5607b63
2 changed files with 15 additions and 15 deletions

View File

@ -2174,21 +2174,6 @@ func TestGoBuildGOPATHOrderBroken(t *testing.T) {
tg.run("install", "-x", "bar")
}
func TestIssue11709(t *testing.T) {
tg := testgo(t)
defer tg.cleanup()
tg.tempFile("run.go", `
package main
import "os"
func main() {
if os.Getenv("TERM") != "" {
os.Exit(1)
}
}`)
tg.unsetenv("TERM")
tg.run("run", tg.path("run.go"))
}
func TestGoBuildARM(t *testing.T) {
if testing.Short() {
t.Skip("skipping cross-compile in short mode")

View File

@ -0,0 +1,15 @@
# 'go run' should not pass extraneous environment variables to the subprocess.
go run run.go
! stdout .
! stderr .
-- run.go --
package main
import "os"
func main() {
if os.Getenv("TERM") != "" {
os.Exit(1)
}
}