add test for directory source ordering
This commit is contained in:
parent
367b59371f
commit
7536feb801
1 changed files with 17 additions and 0 deletions
|
|
@ -4305,6 +4305,23 @@ mod scanner {
|
|||
assert!(candidates.is_empty());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn later_directory_sources_override_earlier_not_sources() {
|
||||
let ScanResult {
|
||||
candidates, files, ..
|
||||
} = scan_with_globs(
|
||||
&[("src/index.html", "content-['src/index.html']")],
|
||||
vec![
|
||||
"@source '**/*'",
|
||||
"@source not './src'",
|
||||
"@source './src'",
|
||||
],
|
||||
);
|
||||
|
||||
assert_eq!(candidates, vec!["content-['src/index.html']"]);
|
||||
assert_eq!(files, vec!["src/index.html"]);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn wildcard_not_sources_exclude_matching_directories() {
|
||||
let ScanResult {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue