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:
parent
635f4b903a
commit
e5f5607b63
@ -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")
|
||||
|
15
src/cmd/go/testdata/script/run_issue11709.txt
vendored
Normal file
15
src/cmd/go/testdata/script/run_issue11709.txt
vendored
Normal 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)
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user