File tree Expand file tree Collapse file tree
src/Network/HaskellNet/IMAP Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2222 - " 9.8.4"
2323 - " 9.10.2"
2424 - " 9.12.2"
25+ - " 9.14.1"
2526 exclude :
2627 # These don't work on GitHub CI anymore because they need llvm@13, which became
2728 # disabled on 12/31/2024
Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ Tested-with:
2424 || == 9.8.4
2525 || == 9.10.2
2626 || == 9.12.2
27+ || == 9.14.1
2728
2829Extra-Source-Files :
2930 CHANGELOG
@@ -67,7 +68,7 @@ Library
6768 Network.Mail.Mime
6869
6970 Build-Depends :
70- base >= 4.3 && < 4.22 ,
71+ base >= 4.3 && < 4.23 ,
7172 network >= 2.6.3.1 && < 3.3 ,
7273 mtl >= 2.2.2 && < 2.4 ,
7374 bytestring >= 0.10.2 && < 0.13 ,
@@ -94,7 +95,7 @@ Test-suite imap-parsers
9495 Main-is : IMAPParsersTest.hs
9596 default-language : Haskell2010
9697 Build-Depends :
97- base >= 4.3 && < 4.22 ,
98+ base >= 4.3 && < 4.23 ,
9899 bytestring >= 0.10.2 && < 0.13 ,
99100 HaskellNet,
100101 HUnit >= 1.6 && < 1.7
Original file line number Diff line number Diff line change @@ -189,7 +189,7 @@ pFlag = do char '\\'
189189 , string " Draft" >> return Draft
190190 , string " Recent" >> return Recent
191191 , char ' *' >> return (Keyword " *" )
192- , many1 atomChar >>= return . Keyword ]
192+ , many1 atomChar >>= return . Keyword . ( ' \\ ' : ) ]
193193 <|> (many1 atomChar >>= return . Keyword )
194194
195195pParenFlags :: RespDerivs -> Result RespDerivs [Flag ]
Original file line number Diff line number Diff line change @@ -61,7 +61,8 @@ instance Show Flag where
6161 showFlag Deleted = " \\ Deleted"
6262 showFlag Draft = " \\ Draft"
6363 showFlag Recent = " \\ Recent"
64- showFlag (Keyword s) = " \\ " ++ s
64+ showFlag (Keyword " *" ) = " \\ *"
65+ showFlag (Keyword s) = s
6566
6667data Attribute = Noinferiors
6768 | Noselect
Original file line number Diff line number Diff line change @@ -233,6 +233,19 @@ fetchTest =
233233 \a005 OK +FLAGS completed\r\n "
234234 ]
235235
236+ flagTest =
237+ [ " keyword show omits backslash" ~:
238+ " Custom" ~=? show (Keyword " Custom" )
239+ , " permanent wildcard show keeps backslash" ~:
240+ " \\ *" ~=? show (Keyword " *" )
241+ , " keyword parser keeps bare keyword" ~:
242+ [Keyword " Custom" ] ~=? eval' dvFlags " " " (Custom)"
243+ , " keyword parser keeps permanent wildcard" ~:
244+ [Keyword " *" ] ~=? eval' dvFlags " " " (\\ *)"
245+ , " keyword parser preserves unknown system flag" ~:
246+ [Keyword " \\ Custom" ] ~=? eval' dvFlags " " " (\\ Custom)"
247+ ]
248+
236249
237250imapFetchTest =
238251 [ " fetch works when BODY precedes UID" ~: TestCase $ do
@@ -257,6 +270,7 @@ testData = [ "base" ~: baseTest
257270 , " search" ~: searchTest
258271 , " fetch" ~: fetchTest
259272 , " imap fetch api" ~: imapFetchTest
273+ , " flags" ~: flagTest
260274 ]
261275
262276
You can’t perform that action at this time.
0 commit comments