add test for explicit extensionless file sources

This commit is contained in:
Robin Malfait 2026-08-12 15:32:35 +02:00
parent d78a138ca3
commit 79b2ce7af8
No known key found for this signature in database

View file

@ -4321,6 +4321,19 @@ mod scanner {
assert_eq!(files, vec!["src/foo/index.html"]);
}
#[test]
fn explicit_file_sources_include_default_ignored_files_without_extensions() {
let ScanResult {
candidates, files, ..
} = scan_with_globs(
&[(".env", "content-['.env']"), ("index.html", "content-['index.html']")],
vec!["@source '.env'"],
);
assert_eq!(candidates, vec!["content-['.env']"]);
assert_eq!(files, vec![".env"]);
}
#[test]
fn test_extract_used_css_variables_from_css() {
let dir = tempdir().unwrap().into_path();