From 79b2ce7af8d2c6c49dc715175e242a032283d1fc Mon Sep 17 00:00:00 2001 From: Robin Malfait Date: Wed, 12 Aug 2026 15:32:35 +0200 Subject: [PATCH] add test for explicit extensionless file sources --- crates/oxide/tests/scanner.rs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/crates/oxide/tests/scanner.rs b/crates/oxide/tests/scanner.rs index 66c334d24..b1bf7f857 100644 --- a/crates/oxide/tests/scanner.rs +++ b/crates/oxide/tests/scanner.rs @@ -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();