From b80743c840153b1ecd0588b2ad8d5c12c5e8b6a2 Mon Sep 17 00:00:00 2001 From: George Thomas Date: Wed, 7 Jan 2026 01:11:45 +0000 Subject: [PATCH] Indent test failures --- haskell/Pre.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/haskell/Pre.hs b/haskell/Pre.hs index 34f93cd..b0fc03d 100644 --- a/haskell/Pre.hs +++ b/haskell/Pre.hs @@ -318,12 +318,11 @@ displayTestResultsConsole terminalWidth testResult = TL.fromStrict $ header Red '✗' name indent Nothing <> setColour Vivid Red - <> case e of + <> paddedAllLines (T.replicate (indent * 2) " ") case e of ExceptionFailure ex -> T.show ex AssertionFailure t -> T.stripEnd t GoldenFailure{expected, actual} -> "Expected:\n" <> T.stripEnd expected <> "\nActual:\n" <> T.stripEnd actual - <> "\n" header colour icon name indent time = setColour Vivid colour <> T.singleton icon @@ -346,6 +345,7 @@ displayTestResultsConsole terminalWidth testResult = ) time <> "\n" + paddedAllLines p = T.unlines . map (p <>) . T.lines showTime (nominalDiffTimeToSeconds -> MkFixed duration) = -- SI prefixes, and always exactly 2 decimal places, or 3 if there's no prefix T.show res