pub fn detect_with_env(
colorterm: Option<&str>,
term: Option<&str>,
) -> ColorCapabilityExpand description
Detect color capability with explicit environment values (for testing).
This function allows testing the detection logic with specific environment variable values without modifying the actual environment.
§Arguments
colorterm- Optional value for$COLORTERMterm- Optional value for$TERM
§Returns
The ColorCapability that would be detected with the given environment.
§Note
This function does NOT cache its result and is primarily intended for
testing purposes. For normal usage, use detect_color_capability().