1
0
mirror of https://github.com/golang/go synced 2024-11-25 11:37:57 -07:00

os: ignored is not exist error

Fixes #57638
This commit is contained in:
Javad 2023-01-17 09:43:37 +03:30
parent d93f487dd0
commit 8cb19f0e99

View File

@ -2554,18 +2554,9 @@ func TestUserCacheDir(t *testing.T) {
t.Fatal("UserCacheDir return empty string without error")
}
if err != nil {
if err != nil && IsNotExist(err) {
t.Skipf("UserCacheDir failed: %v", err)
}
stat, err := Stat(cacheDir)
if err != nil {
t.Fatal(err)
}
if !stat.IsDir() {
t.Fatalf("dir %s is not directory and type is %v", cacheDir, stat.Mode())
}
}
func TestUserHomeDir(t *testing.T) {