mirror of
https://github.com/safedep/vet.git
synced 2025-12-10 00:22:08 -06:00
test: Add test case for relative exclusion matcher
This commit is contained in:
parent
7f8b335393
commit
c2cb4375f8
@ -93,6 +93,18 @@ func TestExcludedPath(t *testing.T) {
|
||||
patterns: []string{"**/requirements.txt"},
|
||||
shouldBeExcluded: true,
|
||||
},
|
||||
{
|
||||
name: "path relative files does not match without double star",
|
||||
path: "/tmp/some/dir/our-dir/package-lock.json",
|
||||
patterns: []string{"our-dir/package-lock.json"},
|
||||
shouldBeExcluded: false,
|
||||
},
|
||||
{
|
||||
name: "path relative files should match in tmp directory as well",
|
||||
path: "/tmp/some/dir/our-dir/package-lock.json",
|
||||
patterns: []string{"**/our-dir/package-lock.json"},
|
||||
shouldBeExcluded: true,
|
||||
},
|
||||
}
|
||||
|
||||
for _, tc := range cases {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user