diff --git a/plugin_test.go b/plugin_test.go index 31de0b6..e7954a9 100644 --- a/plugin_test.go +++ b/plugin_test.go @@ -435,12 +435,12 @@ func TestIgnoreList(t *testing.T) { assert.Nil(t, err) // check file exist - if _, err := os.Stat(filepath.Join(u.HomeDir, "ignore/c.txt")); err == nil { + if _, err := os.Stat(filepath.Join(u.HomeDir, "ignore/c.txt")); !os.IsNotExist(err) { t.Fatal("c.txt file exist") } // check file exist - if _, err := os.Stat(filepath.Join(u.HomeDir, "ignore/e.txt")); err == nil { + if _, err := os.Stat(filepath.Join(u.HomeDir, "ignore/e.txt")); !os.IsNotExist(err) { t.Fatal("c.txt file exist") }