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 1d24c651_e65e_8f12_7b76_1af6502b44df["test_ignore_files_can_be_included_with_custom_source_rule()"] 340ddba0_15e4_a309_9dea_cf6d6e73381d["scanner.rs"] 1d24c651_e65e_8f12_7b76_1af6502b44df -->|defined in| 340ddba0_15e4_a309_9dea_cf6d6e73381d a055cb70_8b14_31db_b201_57369f5fda5a["create_files_in()"] 1d24c651_e65e_8f12_7b76_1af6502b44df -->|calls| a055cb70_8b14_31db_b201_57369f5fda5a 773530fa_5b76_d390_68d3_405d48fbecf7["public_source_entry_from_pattern()"] 1d24c651_e65e_8f12_7b76_1af6502b44df -->|calls| 773530fa_5b76_d390_68d3_405d48fbecf7 2f3305c3_ad36_6002_daa9_52b16e0424fd["scan()"] 1d24c651_e65e_8f12_7b76_1af6502b44df -->|calls| 2f3305c3_ad36_6002_daa9_52b16e0424fd style 1d24c651_e65e_8f12_7b76_1af6502b44df 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
Defined In
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, defined in crates/oxide/tests/scanner.rs.
Where is test_ignore_files_can_be_included_with_custom_source_rule() defined?
test_ignore_files_can_be_included_with_custom_source_rule() is defined in crates/oxide/tests/scanner.rs at line 1297.
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