Skip to content

Commit e5f5607

Browse files
committed
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 <[email protected]>
1 parent 635f4b9 commit e5f5607

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

src/cmd/go/go_test.go

-15
Original file line numberDiff line numberDiff line change
@@ -2174,21 +2174,6 @@ func TestGoBuildGOPATHOrderBroken(t *testing.T) {
21742174
tg.run("install", "-x", "bar")
21752175
}
21762176

2177-
func TestIssue11709(t *testing.T) {
2178-
tg := testgo(t)
2179-
defer tg.cleanup()
2180-
tg.tempFile("run.go", `
2181-
package main
2182-
import "os"
2183-
func main() {
2184-
if os.Getenv("TERM") != "" {
2185-
os.Exit(1)
2186-
}
2187-
}`)
2188-
tg.unsetenv("TERM")
2189-
tg.run("run", tg.path("run.go"))
2190-
}
2191-
21922177
func TestGoBuildARM(t *testing.T) {
21932178
if testing.Short() {
21942179
t.Skip("skipping cross-compile in short mode")
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# 'go run' should not pass extraneous environment variables to the subprocess.
2+
go run run.go
3+
! stdout .
4+
! stderr .
5+
6+
-- run.go --
7+
package main
8+
9+
import "os"
10+
11+
func main() {
12+
if os.Getenv("TERM") != "" {
13+
os.Exit(1)
14+
}
15+
}

0 commit comments

Comments
 (0)