aboutsummaryrefslogtreecommitdiff
path: root/src/os/exec
diff options
context:
space:
mode:
Diffstat (limited to 'src/os/exec')
-rw-r--r--src/os/exec/lp_unix_test.go8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/os/exec/lp_unix_test.go b/src/os/exec/lp_unix_test.go
index 75bcdb1fdd..9fded0eb0a 100644
--- a/src/os/exec/lp_unix_test.go
+++ b/src/os/exec/lp_unix_test.go
@@ -37,13 +37,7 @@ func TestLookPathUnixEmptyPath(t *testing.T) {
t.Fatal("Close failed: ", err)
}
- pathenv := os.Getenv("PATH")
- defer os.Setenv("PATH", pathenv)
-
- err = os.Setenv("PATH", "")
- if err != nil {
- t.Fatal("Setenv failed: ", err)
- }
+ t.Setenv("PATH", "")
path, err := LookPath("exec_me")
if err == nil {