diff --git a/core/Test/Tasty/Ingredients/ConsoleReporter.hs b/core/Test/Tasty/Ingredients/ConsoleReporter.hs index 6bda388b..10693242 100644 --- a/core/Test/Tasty/Ingredients/ConsoleReporter.hs +++ b/core/Test/Tasty/Ingredients/ConsoleReporter.hs @@ -169,9 +169,10 @@ 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. - putChar '\r' + clearLine putStr testNamePadded infoOk msg hFlush stdout @@ -190,6 +191,7 @@ buildTestOutput opts tree = when getAnsiTricks $ do putChar '\r' + clearLine putStr testNamePadded printFn (resultShortDescription result)