diff --git a/atomicfile_test.go b/atomicfile_test.go index d9dc593..de5c018 100644 --- a/atomicfile_test.go +++ b/atomicfile_test.go @@ -150,6 +150,9 @@ func TestDeferredCancel(t *testing.T) { func TestSameDirectory(t *testing.T) { tmp := t.TempDir() + if err := os.Chdir(tmp); err != nil { + t.Fatalf("Chdir: %v", err) + } f, err := atomicfile.New("xyzzy", 0644) if err != nil {