diff options
Diffstat (limited to 'lib/ignore/ignore_test.go')
-rw-r--r-- | lib/ignore/ignore_test.go | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/ignore/ignore_test.go b/lib/ignore/ignore_test.go index ccdcd122e..5d0a8b02c 100644 --- a/lib/ignore/ignore_test.go +++ b/lib/ignore/ignore_test.go @@ -1122,8 +1122,8 @@ func TestIssue5009(t *testing.T) { if err := pats.Parse(bytes.NewBufferString(stignore), ".stignore"); err != nil { t.Fatal(err) } - if !pats.skipIgnoredDirs { - t.Error("skipIgnoredDirs should be true without includes") + if m := pats.Match("ign2"); !m.CanSkipDir() { + t.Error("CanSkipDir should be true without excludes") } stignore = ` @@ -1138,8 +1138,8 @@ func TestIssue5009(t *testing.T) { t.Fatal(err) } - if pats.skipIgnoredDirs { - t.Error("skipIgnoredDirs should not be true with includes") + if m := pats.Match("ign2"); m.CanSkipDir() { + t.Error("CanSkipDir should not be true with excludes") } } @@ -1272,8 +1272,8 @@ func TestSkipIgnoredDirs(t *testing.T) { if err := pats.Parse(bytes.NewBufferString(stignore), ".stignore"); err != nil { t.Fatal(err) } - if !pats.SkipIgnoredDirs() { - t.Error("SkipIgnoredDirs should be true") + if m := pats.Match("whatever"); !m.CanSkipDir() { + t.Error("CanSkipDir should be true") } stignore = ` @@ -1283,8 +1283,8 @@ func TestSkipIgnoredDirs(t *testing.T) { if err := pats.Parse(bytes.NewBufferString(stignore), ".stignore"); err != nil { t.Fatal(err) } - if pats.SkipIgnoredDirs() { - t.Error("SkipIgnoredDirs should be false") + if m := pats.Match("whatever"); m.CanSkipDir() { + t.Error("CanSkipDir should be false") } } |