From b152a0bc63166a4592e1f3639ef09e78a43f2b57 Mon Sep 17 00:00:00 2001 From: Sergey Vinokurov Date: Wed, 6 Dec 2023 19:14:25 +0000 Subject: [PATCH] Simplify further: \r is sufficient to clear whole line, no need for additional escape sequence --- core/Test/Tasty/Ingredients/ConsoleReporter.hs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/core/Test/Tasty/Ingredients/ConsoleReporter.hs b/core/Test/Tasty/Ingredients/ConsoleReporter.hs index 10693242..6bda388b 100644 --- a/core/Test/Tasty/Ingredients/ConsoleReporter.hs +++ b/core/Test/Tasty/Ingredients/ConsoleReporter.hs @@ -169,10 +169,9 @@ buildTestOutput opts tree = ("", pct) -> printf "%.0f%% " pct (txt, 0.0) -> printf "%s" txt (txt, pct) -> printf "%s: %.0f%% " txt pct - putChar '\r' -- A new progress message may be shorter than the previous one -- so we must clean whole line and print anew. - clearLine + putChar '\r' putStr testNamePadded infoOk msg hFlush stdout @@ -191,7 +190,6 @@ buildTestOutput opts tree = when getAnsiTricks $ do putChar '\r' - clearLine putStr testNamePadded printFn (resultShortDescription result)