summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
6313d8b)
This only affects the rarely-used STATUS command, our message
count was consistely zero due to misusing ->imap_exists.
Noticed while implementing POP3 server.
$self->{ibx} = $ibx;
$self->{uo2m} = uo2m_ary_new($self, \$exists);
} else {
$self->{ibx} = $ibx;
$self->{uo2m} = uo2m_ary_new($self, \$exists);
} else {
- $exists = $over->imap_exists;
+ my $uid_end = $uid_base + UID_SLICE;
+ $exists = $over->imap_exists($uid_base, $uid_end);
}
ensure_slices_exist($self->{imapd}, $ibx, $over->max);
} else {
}
ensure_slices_exist($self->{imapd}, $ibx, $over->max);
} else {
-# 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;
# 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;
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
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;
like($raw[1], qr/\A\S+ OK /, 'finished status response');
my @orig_list = @raw = $mic->list;