Skip to content

Commit 2f2e97c

Browse files
committed
cmd/go: convert TestIssue12096 to the script framework
Part of converting all tests to script framework to improve test parallelism. Updates #36320 Updates #17751 Change-Id: I27e52c4eabfcd1782965f17c098719dd0ea7e3ca Reviewed-on: https://go-review.googlesource.com/c/go/+/214390 Reviewed-by: Jay Conrod <[email protected]>
1 parent ea38df0 commit 2f2e97c

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
@@ -2189,21 +2189,6 @@ func TestIssue11709(t *testing.T) {
21892189
tg.run("run", tg.path("run.go"))
21902190
}
21912191

2192-
func TestIssue12096(t *testing.T) {
2193-
tg := testgo(t)
2194-
defer tg.cleanup()
2195-
tg.tempFile("test_test.go", `
2196-
package main
2197-
import ("os"; "testing")
2198-
func TestEnv(t *testing.T) {
2199-
if os.Getenv("TERM") != "" {
2200-
t.Fatal("TERM is set")
2201-
}
2202-
}`)
2203-
tg.unsetenv("TERM")
2204-
tg.run("test", tg.path("test_test.go"))
2205-
}
2206-
22072192
func TestGoBuildARM(t *testing.T) {
22082193
if testing.Short() {
22092194
t.Skip("skipping cross-compile in short mode")
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Tests golang.org/issue/12096
2+
3+
env TERM=''
4+
go test test_test.go
5+
! stdout '^ok.*\[no tests to run\]'
6+
stdout '^ok'
7+
8+
-- test_test.go --
9+
package main
10+
import ("os"; "testing")
11+
func TestEnv(t *testing.T) {
12+
if os.Getenv("TERM") != "" {
13+
t.Fatal("TERM is set")
14+
}
15+
}

0 commit comments

Comments
 (0)