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 415c6105_0940_8090_9fca_fe70ca64420a["test_ignore_files_can_be_included_with_custom_source_rule()"] 3a07392e_ccde_2e1e_c4dd_a2d547d20807["create_files_in()"] 415c6105_0940_8090_9fca_fe70ca64420a -->|calls| 3a07392e_ccde_2e1e_c4dd_a2d547d20807 d847ae88_0e93_5005_413e_ff86e08c4291["public_source_entry_from_pattern()"] 415c6105_0940_8090_9fca_fe70ca64420a -->|calls| d847ae88_0e93_5005_413e_ff86e08c4291 66c99d71_b17e_d5a4_2a47_c675fac3c9cc["scan()"] 415c6105_0940_8090_9fca_fe70ca64420a -->|calls| 66c99d71_b17e_d5a4_2a47_c675fac3c9cc style 415c6105_0940_8090_9fca_fe70ca64420a 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