aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/cmd/go/go_test.go15
-rw-r--r--src/cmd/go/testdata/script/test_env_term.txt15
2 files changed, 15 insertions, 15 deletions
diff --git a/src/cmd/go/go_test.go b/src/cmd/go/go_test.go
index 2c829f38b6..2e07565648 100644
--- a/src/cmd/go/go_test.go
+++ b/src/cmd/go/go_test.go
@@ -2189,21 +2189,6 @@ func TestIssue11709(t *testing.T) {
tg.run("run", tg.path("run.go"))
}
-func TestIssue12096(t *testing.T) {
- tg := testgo(t)
- defer tg.cleanup()
- tg.tempFile("test_test.go", `
- package main
- import ("os"; "testing")
- func TestEnv(t *testing.T) {
- if os.Getenv("TERM") != "" {
- t.Fatal("TERM is set")
- }
- }`)
- tg.unsetenv("TERM")
- tg.run("test", tg.path("test_test.go"))
-}
-
func TestGoBuildARM(t *testing.T) {
if testing.Short() {
t.Skip("skipping cross-compile in short mode")
diff --git a/src/cmd/go/testdata/script/test_env_term.txt b/src/cmd/go/testdata/script/test_env_term.txt
new file mode 100644
index 0000000000..8a5f79ab22
--- /dev/null
+++ b/src/cmd/go/testdata/script/test_env_term.txt
@@ -0,0 +1,15 @@
+# Tests golang.org/issue/12096
+
+env TERM=''
+go test test_test.go
+! stdout '^ok.*\[no tests to run\]'
+stdout '^ok'
+
+-- test_test.go --
+package main
+import ("os"; "testing")
+func TestEnv(t *testing.T) {
+ if os.Getenv("TERM") != "" {
+ t.Fatal("TERM is set")
+ }
+} \ No newline at end of file