mirror of
https://github.com/octoleo/restic.git
synced 2024-12-22 10:58:55 +00:00
filter: additional tests for filter.List()
This commit is contained in:
parent
13aae82635
commit
13c40d4199
@ -248,6 +248,7 @@ var filterListTests = []struct {
|
||||
}{
|
||||
{[]string{}, "/foo/bar/test.go", false, false},
|
||||
{[]string{"*.go"}, "/foo/bar/test.go", true, true},
|
||||
{[]string{"*.go"}, "/foo/bar", false, true},
|
||||
{[]string{"*.c"}, "/foo/bar/test.go", false, true},
|
||||
{[]string{"*.go", "*.c"}, "/foo/bar/test.go", true, true},
|
||||
{[]string{"*"}, "/foo/bar/test.go", true, true},
|
||||
@ -255,8 +256,12 @@ var filterListTests = []struct {
|
||||
{[]string{"?"}, "/foo/bar/test.go", false, true},
|
||||
{[]string{"?", "x"}, "/foo/bar/x", true, true},
|
||||
{[]string{"/*/*/bar/test.*"}, "/foo/bar/test.go", false, false},
|
||||
{[]string{"/*/*/bar/test.*"}, "/foo/bar/bar", false, true},
|
||||
{[]string{"/*/*/bar/test.*", "*.go"}, "/foo/bar/test.go", true, true},
|
||||
{[]string{"", "*.c"}, "/foo/bar/test.go", false, true},
|
||||
{[]string{"/foo/bar/*"}, "/foo", false, true},
|
||||
{[]string{"/foo/**/test.c"}, "/foo/bar/foo/bar/test.c", true, true},
|
||||
{[]string{"/foo/*/test.c"}, "/foo/bar/foo/bar/test.c", false, false},
|
||||
}
|
||||
|
||||
func TestList(t *testing.T) {
|
||||
|
Loading…
Reference in New Issue
Block a user