mirror of
https://github.com/golang/go
synced 2024-11-25 09:17:57 -07:00
parent
d93f487dd0
commit
8cb19f0e99
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user