From d4ad2b809c62b59ee4c3767bf1ff096b30886bdb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Mon, 9 May 2022 13:25:04 +0200 Subject: feat(test): repeat test name if there's user output (#14495) This commit changes test report output to repeat test name before printing result, but only if there's user output, denoted by markers. --- cli/tools/test.rs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'cli/tools') diff --git a/cli/tools/test.rs b/cli/tools/test.rs index 1eb36671e..6ed443806 100644 --- a/cli/tools/test.rs +++ b/cli/tools/test.rs @@ -312,6 +312,10 @@ impl PrettyTestReporter { print!("{}", " ".repeat(description.level)); } + if wrote_user_output { + print!("{} ... ", description.name); + } + println!( "{} {}", status, @@ -414,6 +418,10 @@ impl TestReporter for PrettyTestReporter { print!(" "); } + if wrote_user_output { + print!("{} ... ", description.name); + } + let status = match result { TestResult::Ok => colors::green("ok").to_string(), TestResult::Ignored => colors::yellow("ignored").to_string(), -- cgit v1.2.3