aboutsummaryrefslogtreecommitdiff
path: root/src/os/exec/exec_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/os/exec/exec_test.go')
-rw-r--r--src/os/exec/exec_test.go22
1 files changed, 0 insertions, 22 deletions
diff --git a/src/os/exec/exec_test.go b/src/os/exec/exec_test.go
index fd185cadcf..8c62387193 100644
--- a/src/os/exec/exec_test.go
+++ b/src/os/exec/exec_test.go
@@ -169,28 +169,6 @@ func helperCommandContext(t *testing.T, ctx context.Context, name string, args .
return cmd
}
-func chdir(t *testing.T, dir string) {
- t.Helper()
-
- prev, err := os.Getwd()
- if err != nil {
- t.Fatal(err)
- }
- if err := os.Chdir(dir); err != nil {
- t.Fatal(err)
- }
- t.Logf("Chdir(%#q)", dir)
-
- t.Cleanup(func() {
- if err := os.Chdir(prev); err != nil {
- // Couldn't chdir back to the original working directory.
- // panic instead of t.Fatal so that we don't run other tests
- // in an unexpected location.
- panic("couldn't restore working directory: " + err.Error())
- }
- })
-}
-
var helperCommandUsed sync.Map
var helperCommands = map[string]func(...string){