diff options
author | Eric Wong <e@80x24.org> | 2022-07-08 11:36:37 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2022-07-08 12:16:39 +0000 |
commit | f7963248263d6c115275b2974ae02b424415f37b (patch) | |
tree | b6b3cff50ac4fa082cdf08ad00b51e34f5a6b84c /t | |
parent | 6313d8bbc5f3816eb4936443fca57b411f4f6286 (diff) | |
download | public-inbox-f7963248263d6c115275b2974ae02b424415f37b.tar.gz |
This only affects the rarely-used STATUS command, our message count was consistely zero due to misusing ->imap_exists. Noticed while implementing POP3 server.
Diffstat (limited to 't')
-rw-r--r-- | t/imapd.t | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -1,5 +1,5 @@ #!perl -w -# Copyright (C) 2020-2021 all contributors <meta@public-inbox.org> +# Copyright (C) all contributors <meta@public-inbox.org> # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt> # end-to-end IMAP tests, see unit tests in t/imap.t, too use strict; @@ -99,7 +99,8 @@ ok($mic->examine($mailbox1), 'EXAMINE succeeds'); my @raw = $mic->status($mailbox1, qw(Messages uidnext uidvalidity)); is(scalar(@raw), 2, 'got status response'); like($raw[0], qr/\A\*\x20STATUS\x20inbox\.i1\.$first_range\x20 - \(MESSAGES\x20\d+\x20UIDNEXT\x20\d+\x20UIDVALIDITY\x20\d+\)\r\n/sx); + \(MESSAGES\x20[1-9][0-9]*\x20 + UIDNEXT\x20\d+\x20UIDVALIDITY\x20\d+\)\r\n/sx); like($raw[1], qr/\A\S+ OK /, 'finished status response'); my @orig_list = @raw = $mic->list; |