update the test to make sure that files matching part of the ignore are not excluded

This commit is contained in:
Thomas Etter 2019-11-12 11:29:42 +01:00 committed by Félix Saparelli
parent 1c6f5fab89
commit 6e64a2c152
1 changed files with 2 additions and 0 deletions

View File

@ -151,6 +151,8 @@ mod tests {
// Make sure that sub-directories/-files are recursively ignored.
assert!(filter.is_excluded(Path::new("target/rls")));
assert!(filter.is_excluded(Path::new("target/rls/debug")));
// Assert that files containing subsets of the path are not ignored.
assert!(!filter.is_excluded(Path::new("target-file")));
assert!(!filter.is_excluded(Path::new("hello.rs")));
assert!(!filter.is_excluded(Path::new("Cargo.toml")));
}