add test for unreachable gitignore whitelists
This commit is contained in:
parent
ae45aca295
commit
7de8663522
1 changed files with 21 additions and 0 deletions
|
|
@ -4334,6 +4334,27 @@ mod scanner {
|
|||
assert_eq!(files, vec![".env"]);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn unreachable_whitelists_do_not_reinclude_explicit_source_directories() {
|
||||
let ScanResult {
|
||||
candidates, files, ..
|
||||
} = scan_with_globs(
|
||||
&[
|
||||
(".gitignore", "parent/"),
|
||||
("parent/.gitignore", "!child/"),
|
||||
("parent/child/.gitignore", "index.html"),
|
||||
(
|
||||
"parent/child/index.html",
|
||||
"content-['parent/child/index.html']",
|
||||
),
|
||||
],
|
||||
vec!["@source './parent/child'"],
|
||||
);
|
||||
|
||||
assert_eq!(candidates, vec!["content-['parent/child/index.html']"]);
|
||||
assert_eq!(files, vec!["parent/child/index.html"]);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_extract_used_css_variables_from_css() {
|
||||
let dir = tempdir().unwrap().into_path();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue