test_ignore_files_can_be_included_with_custom_source_rule() — tailwindcss Function Reference
Architecture documentation for the test_ignore_files_can_be_included_with_custom_source_rule() function in scanner.rs from the tailwindcss codebase.
Entity Profile
Dependency Diagram
graph TD 9b78adac_d326_702e_85a1_db56ea4b854e["test_ignore_files_can_be_included_with_custom_source_rule()"] 96c928f4_eee8_bcbc_0339_e2dce4b2d810["create_files_in()"] 9b78adac_d326_702e_85a1_db56ea4b854e -->|calls| 96c928f4_eee8_bcbc_0339_e2dce4b2d810 257cbf08_9e94_64b3_97f2_0416460fab35["public_source_entry_from_pattern()"] 9b78adac_d326_702e_85a1_db56ea4b854e -->|calls| 257cbf08_9e94_64b3_97f2_0416460fab35 1581ed51_04e1_62c1_6e26_ea43cf82d5f9["scan()"] 9b78adac_d326_702e_85a1_db56ea4b854e -->|calls| 1581ed51_04e1_62c1_6e26_ea43cf82d5f9 style 9b78adac_d326_702e_85a1_db56ea4b854e fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
crates/oxide/tests/scanner.rs lines 1297–1354
fn test_ignore_files_can_be_included_with_custom_source_rule() {
// Create a temporary working directory
let dir = tempdir().unwrap().into_path();
// Create files
create_files_in(
&dir,
&[("src/keep-me.html", "content-['src/keep-me.html']")],
);
let mut scanner = Scanner::new(vec![
public_source_entry_from_pattern(dir.clone(), "@source '**/*.html'"),
public_source_entry_from_pattern(
dir.clone(),
"@source not 'src/ignored-by-source-not.html'",
),
]);
let candidates = scanner.scan();
assert_eq!(candidates, vec!["content-['src/keep-me.html']"]);
// Create new files that should definitely be ignored
create_files_in(
&dir,
&[
// Create new file that matches the `@source '…'` glob
("src/new-file.html", "content-['src/new-file.html']"),
// Create new file that is ignored based on file extension
(
"src/ignore-by-extension.bin",
"content-['src/ignore-by-extension.bin']",
),
// Create a file that is ignored based on the `.gitignore` file
(".gitignore", "src/ignored-by-gitignore.html"),
(
"src/ignored-by-gitignore.html",
"content-['src/ignored-by-gitignore.html']",
),
// Create a file that is ignored by the `@source not '…'`
(
"src/ignored-by-source-not.html",
"content-['src/ignored-by-source-not.html']",
),
],
);
let candidates = scanner.scan();
assert_eq!(
candidates,
vec![
// Ignored by git ignore BUT included by `@source "**/*.html"`
"content-['src/ignored-by-gitignore.html']",
"content-['src/keep-me.html']",
"content-['src/new-file.html']"
]
);
}
Domain
Subdomains
Source
Frequently Asked Questions
What does test_ignore_files_can_be_included_with_custom_source_rule() do?
test_ignore_files_can_be_included_with_custom_source_rule() is a function in the tailwindcss codebase.
What does test_ignore_files_can_be_included_with_custom_source_rule() call?
test_ignore_files_can_be_included_with_custom_source_rule() calls 3 function(s): create_files_in, public_source_entry_from_pattern, scan.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free