testing: add TB.Chdir · Issue #62516 · golang/go

Sometimes a test need to call os.Chdir(). Here is a bare minimum implementation of what's needed from a test to do that: oldwd, err := Getwd() if err != nil { t.Fatal(err) } if err := Chdir(dir); e...