Home / Function/ test_arbitrary_value_machine_extraction() — tailwindcss Function Reference

test_arbitrary_value_machine_extraction() — tailwindcss Function Reference

Architecture documentation for the test_arbitrary_value_machine_extraction() function in arbitrary_value_machine.rs from the tailwindcss codebase.

Entity Profile

Dependency Diagram

graph TD
  c8ece926_d527_a341_08ac_c31f6b2e240b["test_arbitrary_value_machine_extraction()"]
  2b32c2f1_30a5_e7bc_225e_f9c276ad26c0["arbitrary_value_machine.rs"]
  c8ece926_d527_a341_08ac_c31f6b2e240b -->|defined in| 2b32c2f1_30a5_e7bc_225e_f9c276ad26c0
  style c8ece926_d527_a341_08ac_c31f6b2e240b fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

crates/oxide/src/extractor/arbitrary_value_machine.rs lines 166–199

    fn test_arbitrary_value_machine_extraction() {
        for (input, expected) in [
            // Simple variable
            ("[#0088cc]", vec!["[#0088cc]"]),
            // With parentheses
            (
                "[url(https://tailwindcss.com)]",
                vec!["[url(https://tailwindcss.com)]"],
            ),
            // With strings, where bracket balancing doesn't matter
            ("['[({])}']", vec!["['[({])}']"]),
            // With strings later in the input
            (
                "[url('https://tailwindcss.com?[{]}')]",
                vec!["[url('https://tailwindcss.com?[{]}')]"],
            ),
            // With nested brackets
            ("[[data-foo]]", vec!["[[data-foo]]"]),
            (
                "[&>[data-slot=icon]:last-child]",
                vec!["[&>[data-slot=icon]:last-child]"],
            ),
            // With data types
            ("[length:32rem]", vec!["[length:32rem]"]),
            // Spaces are not allowed
            ("[ #0088cc ]", vec![]),
            // Unbalanced brackets are not allowed
            ("[foo[bar]", vec![]),
            // Empty brackets are not allowed
            ("[]", vec![]),
        ] {
            assert_eq!(ArbitraryValueMachine::test_extract_all(input), expected);
        }
    }

Domain

Subdomains

Frequently Asked Questions

What does test_arbitrary_value_machine_extraction() do?
test_arbitrary_value_machine_extraction() is a function in the tailwindcss codebase, defined in crates/oxide/src/extractor/arbitrary_value_machine.rs.
Where is test_arbitrary_value_machine_extraction() defined?
test_arbitrary_value_machine_extraction() is defined in crates/oxide/src/extractor/arbitrary_value_machine.rs at line 166.

Analyze Your Own Codebase

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

Try Supermodel Free