Home / Function/ it_should_scan_absolute_paths() — tailwindcss Function Reference

it_should_scan_absolute_paths() — tailwindcss Function Reference

Architecture documentation for the it_should_scan_absolute_paths() function in scanner.rs from the tailwindcss codebase.

Entity Profile

Dependency Diagram

graph TD
  ac52519b_c5e0_da99_f5cd_39121c08ca64["it_should_scan_absolute_paths()"]
  96c928f4_eee8_bcbc_0339_e2dce4b2d810["create_files_in()"]
  ac52519b_c5e0_da99_f5cd_39121c08ca64 -->|calls| 96c928f4_eee8_bcbc_0339_e2dce4b2d810
  1581ed51_04e1_62c1_6e26_ea43cf82d5f9["scan()"]
  ac52519b_c5e0_da99_f5cd_39121c08ca64 -->|calls| 1581ed51_04e1_62c1_6e26_ea43cf82d5f9
  style ac52519b_c5e0_da99_f5cd_39121c08ca64 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

crates/oxide/tests/scanner.rs lines 653–689

    fn it_should_scan_absolute_paths() {
        // Create a temporary working directory
        let dir = tempdir().unwrap().into_path();

        // Initialize this directory as a git repository
        let _ = Command::new("git").arg("init").current_dir(&dir).output();

        // Create files
        create_files_in(
            &dir,
            &[
                ("project-a/index.html", "content-['project-a/index.html']"),
                ("project-b/index.html", "content-['project-b/index.html']"),
            ],
        );

        // Get POSIX-style absolute path
        let full_path = format!("{}", dir.display()).replace('\\', "/");

        let sources = vec![PublicSourceEntry {
            base: full_path.clone(),
            pattern: full_path.clone(),
            negated: false,
        }];

        let mut scanner = Scanner::new(sources);
        let candidates = scanner.scan();

        // We've done the initial scan and found the files
        assert_eq!(
            candidates,
            vec![
                "content-['project-a/index.html']",
                "content-['project-b/index.html']"
            ]
        );
    }

Domain

Subdomains

Frequently Asked Questions

What does it_should_scan_absolute_paths() do?
it_should_scan_absolute_paths() is a function in the tailwindcss codebase.
What does it_should_scan_absolute_paths() call?
it_should_scan_absolute_paths() calls 2 function(s): create_files_in, scan.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free