aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/go/testdata/script/test_env_term.txt
blob: 8a5f79ab22013f76a6368c0515d5a8a173396af5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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")
	}
}