mailing list archives

meli community discussions

⚠️ if something does not work as intended when interracting with the mailing lists,
reach out Github mirror Gitea repo @epilys:matrix.org

E-mail headers
From: Timo Sirainen <tss@iki.fi>
To: imap-protocol@u.washington.edu
Date: Fri, 08 Jun 2018 12:34:41 -0000
Message-ID: 1204181407.11220.53.camel@hurina permalink / raw / eml / mbox
I've finally added support for "normal" command/reply tests for my
imaptest program (http://imapwiki.org/ImapTest). imaptest will include
generic tests that should work with all IMAP servers, but it would be
easy for servers to implement their own private tests that check things
more carefully (but less portably). It would be nice if others could
provide some generic test cases as well.

I haven't yet had time to implement all the features that I'd like (e.g.
unordered list handling needs support), but I think the current features
will allow testing quite a lot already.
http://imapwiki.org/ImapTest/Tests explains how it works.

A couple of examples to show what's possible:

# Check that EXAMINE and STATUS return same UIDVALIDITY
examine $mailbox
* ok [uidvalidity $uidvalidity]
ok [read-only]
ok status $mailbox (uidvalidity)
* status $mailbox (uidvalidity $uidvalidity)

# Test EXPUNGE handling with 2 connections:
connections: 2

1 ok fetch * uid
* $seq fetch (uid $uid)
1 ok store $seq flags \deleted
* $seq fetch (flags (\deleted \recent))
1 ok expunge
* $seq expunge

2 ok fetch $seq uid
* $seq fetch (uid $uid)
2 ok noop
* $seq expunge

# LIST testing:
state: auth

ok list "" ""
* list (\noselect) $sep ""

delete $mailbox${sep}test
""
delete $mailbox${sep}test2
""
ok create $mailbox${sep}test
ok create $mailbox${sep}test2

ok list "" $mailbox$sep%
* list (\hasnochildren) $sep $mailbox${sep}test
* list (\hasnochildren) $sep $mailbox${sep}test2

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 196 bytes
Desc: This is a digitally signed message part
URL: <http://mailman13.u.washington.edu/pipermail/imap-protocol/attachments/20080228/76adac84/attachment.sig>
Reply
E-mail headers
From: tss@iki.fi
To: imap-protocol@localhost
Date: Fri, 08 Jun 2018 12:34:41 -0000
Message-ID: 1204236384.11220.83.camel@hurina permalink / raw / eml / mbox
On Thu, 2008-02-28 at 08:50 +0200, Timo Sirainen wrote:
> A couple of examples to show what's possible:

I added a few more features to make it support pretty much any test I
can think of:

# $n maps to sequences at the beginning of a command:
connections: 2

1 ok store 1,3 +flags \deleted
1 ok expunge
* $1 expunge
* $3 expunge

2 ok uid fetch 2,4 uid
* $1 expunge
* $2 fetch (uid 2)
* $3 expunge
* $4 fetch (uid 4)

The second matches regardless of in what order server sends the
fetch/expunge replies.

# $!directives to specify ordering rules in lists:
ok status $mailbox (messages recent)
* status $mailbox ($!unordered=2 messages 2 recent 2)

The above matches any of:
* status mailbox (messages 2 recent 2)
* status mailbox (recent 2 messages 2)
* status mailbox (recent 2 extension () messages 2 more stuff)

# If the extra isn't wanted:
ok fetch 1 flags
* 1 fetch ($unordered=2 flags ($!unordered $noextra \seen \draft))

These $!directives aren't actually required for the above standard
untagged replies (fetch, fetch flags, status, list) because they're
added by default.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 196 bytes
Desc: This is a digitally signed message part
URL: <http://mailman13.u.washington.edu/pipermail/imap-protocol/attachments/20080229/0b700a31/attachment.sig>
Reply