filter: allow multiple --exclude-if-present flags - fixes #6219
This commit is contained in:
parent
20aaeba547
commit
f4f0e444bf
10 changed files with 31 additions and 24 deletions
|
@ -81,7 +81,7 @@ func TestListDirSorted(t *testing.T) {
|
|||
assert.Equal(t, "sub dir/sub sub dir/", str(1))
|
||||
|
||||
// testing ignore file
|
||||
fi.Opt.ExcludeFile = ".ignore"
|
||||
fi.Opt.ExcludeFile = []string{".ignore"}
|
||||
|
||||
items, err = list.DirSorted(context.Background(), r.Fremote, false, "sub dir")
|
||||
require.NoError(t, err)
|
||||
|
@ -98,7 +98,7 @@ func TestListDirSorted(t *testing.T) {
|
|||
assert.Equal(t, "sub dir/ignore dir/.ignore", str(0))
|
||||
assert.Equal(t, "sub dir/ignore dir/should be ignored", str(1))
|
||||
|
||||
fi.Opt.ExcludeFile = ""
|
||||
fi.Opt.ExcludeFile = nil
|
||||
items, err = list.DirSorted(context.Background(), r.Fremote, false, "sub dir/ignore dir")
|
||||
require.NoError(t, err)
|
||||
require.Len(t, items, 2)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue