From 19e0242135515085243a3b4cb2325c0d91e36136 Mon Sep 17 00:00:00 2001 From: Jonathan Lamothe Date: Wed, 16 Oct 2019 02:26:42 -0400 Subject: [PATCH] fixed name column spacing --- src/Mtlstats/Report.hs | 2 +- test/ReportSpec.hs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Mtlstats/Report.hs b/src/Mtlstats/Report.hs index 17a5b8a..aec4cb9 100644 --- a/src/Mtlstats/Report.hs +++ b/src/Mtlstats/Report.hs @@ -150,7 +150,7 @@ playerReport width label ps = let playerNameColWidth :: [Player] -> Int playerNameColWidth = foldr - (\player current -> max current $ length $ player^.pName) + (\player current -> max current $ succ $ length $ player^.pName) 10 showStats :: GameStats -> String diff --git a/test/ReportSpec.hs b/test/ReportSpec.hs index a42d993..e3b0bab 100644 --- a/test/ReportSpec.hs +++ b/test/ReportSpec.hs @@ -61,5 +61,5 @@ playerNameColWidthSpec = describe "playerNameColWidth" $ do -- label, players, expected [ ( "empty list", [], 10 ) , ( "short names", [short1, short2], 10 ) - , ( "long name", [short1, long], 15 ) + , ( "long name", [short1, long], 16 ) ]