From 19f02fa1b580d0e2ec7af59ca28afd6a678804a1 Mon Sep 17 00:00:00 2001
From: Ashley Yakeley <ashley@yakeley.org>
Date: Tue, 7 Feb 2017 19:48:40 -0800
Subject: [PATCH] test: fix formatting "z" with widths tests

---
 test/unix/Test/Format/Format.hs | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/test/unix/Test/Format/Format.hs b/test/unix/Test/Format/Format.hs
index 1ad674b..35be9b1 100644
--- a/test/unix/Test/Format/Format.hs
+++ b/test/unix/Test/Format/Format.hs
@@ -69,6 +69,10 @@ unixWorkarounds "%_G" s = padN 4 ' ' s
 unixWorkarounds "%0G" s = padN 4 '0' s
 unixWorkarounds "%_f" s = padN 2 ' ' s
 unixWorkarounds "%0f" s = padN 2 '0' s
+unixWorkarounds fmt s | elem 'z' fmt = dropWhile isPadChar s where
+    isPadChar ' ' = True
+    isPadChar '0' = True
+    isPadChar _ = False
 unixWorkarounds _ s = s
 
 compareFormat :: (String -> String) -> String -> TimeZone -> UTCTime -> Result
-- 
GitLab