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>
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")
--- /dev/null
+# '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)
+ }
+}
\ No newline at end of file