Regression test for Office365/Exchange trailing FETCH fields (#15)#114
Merged
qnikst merged 1 commit intoJun 14, 2026
Merged
Conversation
…kst#15) Office365 and Exchange append "UID nn FLAGS (\Seen)" after the BODY[] literal, before the closing ')'. The old Parsec FETCH parser rejected this with "expected space or )". The streaming parser introduced in qnikst#111 already tolerates it; this locks the behaviour in with a test feeding the exact wire shape from qnikst#15 through IMAP.fetch. Also fixes the stale "append preserves raw crlf message bytes" expectation: APPEND now quotes the mailbox name ("INBOX") since the mailbox-quoting change, so the test expectation is updated to match. The suite is green again (48/48). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Contributor
Author
|
@qnikst this one is ready as well :) |
Owner
|
Looks great, thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds a regression test for #15 — Office365 and Exchange append
UID nn FLAGS (\Seen)after theBODY[]literal, before the closing). The old Parsec FETCH parser rejected this withexpected space or ).The streaming FETCH parser introduced in #111 already tolerates trailing fields (it loops consuming key/value pairs until
)), soIMAP.fetchnow returns the body correctly. This test locks the behaviour in by feeding the exact wire shape from the issue throughIMAP.fetchvia the mock stream:Also
Fixes the stale
append preserves raw crlf message bytesexpectation. Since the mailbox-quoting change (0e242d9),APPENDcorrectly quotes the mailbox name ("INBOX"), but that test still expected the unquoted form and was failing onmaster. Expectation updated to match.Verification
cabal test imap-parsers— 48/48 pass (was 47 with 1 pre-existing failure).🤖 Generated with Claude Code
Closes #15