imap: fix custom listing

Add test 1847 and 1848.

Fixes #20356
Closes #20360
This commit is contained in:
Christian Schmitz 2026-01-19 17:01:16 +01:00 committed by Daniel Stenberg
parent cf4164fa8d
commit e788d9d2c7
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
4 changed files with 152 additions and 2 deletions

58
tests/data/test1847 Normal file
View file

@ -0,0 +1,58 @@
<?xml version="1.0" encoding="US-ASCII"?>
<testcase>
<info>
<keywords>
IMAP
Clear Text
FETCH
CUSTOMREQUEST
</keywords>
</info>
# Server-side
<reply>
<data crlf="yes">
From: me@somewhere
To: fake@nowhere
body
--
yours sincerely
</data>
<datacheck crlf="yes">
* FETCH FETCH (1 BODY[] {71}
From: me@somewhere
To: fake@nowhere
body
--
yours sincerely
</datacheck>
</reply>
# Client-side
<client>
<server>
imap
</server>
<name>
IMAP FETCH message with custom request
</name>
<command>
'imap://%HOSTIP:%IMAPPORT/%TESTNUMBER' --request 'UID FETCH 1 BODY[]' -u '"user:sec"ret{'
</command>
</client>
# Verify data after the test has been "shot"
<verify>
<protocol crlf="yes">
A001 CAPABILITY
A002 LOGIN "\"user" "sec\"ret{"
A003 SELECT %TESTNUMBER
A004 UID FETCH 1 BODY[]
A005 LOGOUT
</protocol>
</verify>
</testcase>