From 8247c0b00b1a8353d133d3db6b0603dd8d16374e Mon Sep 17 00:00:00 2001 From: Julian Ospald Date: Tue, 24 Aug 2021 10:51:39 +0200 Subject: [PATCH] Add more doctests --- lib/GHCup/Download.hs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/GHCup/Download.hs b/lib/GHCup/Download.hs index f0a7425..d246635 100644 --- a/lib/GHCup/Download.hs +++ b/lib/GHCup/Download.hs @@ -601,5 +601,7 @@ urlBaseName = snd . B.breakEnd (== _slash) . urlDecode False -- -- >>> getLastHeader "\n\nHTTP/1.0 200 Connection established\n\nHTTP/1.1 304 Not Modified\n" -- "HTTP/1.1 304 Not Modified\n" +-- >>> getLastHeader "HTTP/1.1 304 Not Modified\n" +-- "HTTP/1.1 304 Not Modified\n" getLastHeader :: T.Text -> T.Text getLastHeader = T.unlines . lastDef [] . filter (\x -> not (null x)) . splitOn [""] . fmap T.stripEnd . T.lines