add test for wildcard directory source exclusions
This commit is contained in:
parent
35d2ea025d
commit
fb43708997
1 changed files with 16 additions and 0 deletions
|
|
@ -4305,6 +4305,22 @@ mod scanner {
|
|||
assert!(candidates.is_empty());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn wildcard_not_sources_exclude_matching_directories() {
|
||||
let ScanResult {
|
||||
candidates, files, ..
|
||||
} = scan_with_globs(
|
||||
&[
|
||||
("src/bar/index.html", "content-['src/bar/index.html']"),
|
||||
("src/foo/index.html", "content-['src/foo/index.html']"),
|
||||
],
|
||||
vec!["@source './src/**/*.html'", "@source not './src/ba*'"],
|
||||
);
|
||||
|
||||
assert_eq!(candidates, vec!["content-['src/foo/index.html']"]);
|
||||
assert_eq!(files, vec!["src/foo/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