Skip to main content

named_test_command

Function named_test_command 

Source
pub fn named_test_command(text: &str) -> Option<String>
Expand description

The test command text names, as the matched substring (#8206).

Why: names_test_command’s boolean answer cannot name the command in a refusal message, and detect::TestCommandTarget::PromptNamed needs the literal text the prompt used when no manifest was found. What: The FIRST [test_command_pattern] match in text, e.g. "cargo test" out of “then run cargo test before finishing”. Test: tests::named_test_command_returns_the_matched_text.