Debian Codegraph @

debian/patches/fix-tests

raw
1 From cfc2a4b01f9993b1b51432f0a95fa6730d9a558a Mon Sep 17 00:00:00 2001
2 From: k0001 <[email protected]>
3 Date: Wed, 12 Apr 2023 20:35:34 +0300
4 Subject: [PATCH] Tests.hs: Use time's parseTimeM instead of parseTime
5
6 parseTime is gone in time>=1.10
7 ---
8 tests/Tests.hs | 2 +-
9 1 file changed, 1 insertion(+), 1 deletion(-)
10
11 Index: b/tests/Tests.hs
12 ===================================================================
13 --- a/tests/Tests.hs
14 +++ b/tests/Tests.hs
15 @@ -210,7 +210,7 @@ tests knowns = testGroup "hourglass"
16 [ testProperty "iso8601 date" $ \(e :: Elapsed) ->
17 let fmt = calTimeFormatTimeISO8601 (elapsedToPosixTime e)
18 ed1 = localTimeParseE ISO8601_Date fmt
19 - md2 = T.parseTime T.defaultTimeLocale fmt "%F"
20 + md2 = T.parseTimeM True T.defaultTimeLocale fmt "%F"
21 in case (ed1,md2) of
22 (Left err, Nothing) -> error ("both cannot parse: " ++ show fmt ++ " hourglass-err=" ++ show err)
23 (Left err, Just _) -> error ("error parsing string: " ++ show err)