File tree Expand file tree Collapse file tree 2 files changed +3
-17
lines changed
Expand file tree Collapse file tree 2 files changed +3
-17
lines changed Original file line number Diff line number Diff line change @@ -15,9 +15,10 @@ import (
1515func TestNonModuleFiles (t * testing.T ) {
1616 // Run this whole test in a throw-away temporary directory to not litter the
1717 // gokrazy/tools repository working copy.
18- parent := t . TempDir ()
18+ t . Chdir ( t . TempDir () )
1919
2020 // create a new instance
21+ parent := t .TempDir ()
2122 c := gok.Context {
2223 Args : []string {
2324 "--parent_dir=" + parent ,
Original file line number Diff line number Diff line change @@ -13,22 +13,7 @@ import (
1313func TestRelativeParentDir (t * testing.T ) {
1414 // Run this whole test in a throw-away temporary directory to not litter the
1515 // gokrazy/tools repository working copy.
16-
17- // TODO(go1.24): use t.Chdir()
18- oldwd , err := os .Open ("." )
19- if err != nil {
20- t .Fatal (err )
21- }
22- if err := os .Chdir (t .TempDir ()); err != nil {
23- t .Fatal (err )
24- }
25- t .Cleanup (func () {
26- err := oldwd .Chdir ()
27- oldwd .Close ()
28- if err != nil {
29- t .Fatal (err )
30- }
31- })
16+ t .Chdir (t .TempDir ())
3217
3318 // create a new instance
3419 c := gok.Context {
You can’t perform that action at this time.
0 commit comments