Skip to main content

format_file_selector

Function format_file_selector 

Source
pub fn format_file_selector(file: &str) -> String
Expand description

Compose a file-only selector (FILE).

This is the shape tarn run --select expects for “run every test in this file”. Whitespace is trimmed from the file path so callers can feed it directly from a Url or display path without pre-cleaning.

The returned string always round-trips through Selector::parse — the unit tests below cover this invariant explicitly.