about summary refs log tree commit homepage
path: root/t
diff options
context:
space:
mode:
authorEric Wong <e@yhbt.net>2020-06-10 07:04:05 +0000
committerEric Wong <e@yhbt.net>2020-06-13 07:55:45 +0000
commit7952dfc9ba1255400f85068364150bc5e0db869d (patch)
tree658e87da1395d772b1392f16cf8a965605bfef8f /t
parent9d154055ec44903052beaa4e2c1221f39d6d507a (diff)
downloadpublic-inbox-7952dfc9ba1255400f85068364150bc5e0db869d.tar.gz
I'm not sure if there's much use for this command, but it's
part of RFC3501 and works read-only.
Diffstat (limited to 't')
-rw-r--r--t/imapd.t5
1 files changed, 5 insertions, 0 deletions
diff --git a/t/imapd.t b/t/imapd.t
index b0caa8f1..7512bb90 100644
--- a/t/imapd.t
+++ b/t/imapd.t
@@ -81,6 +81,11 @@ ok(!$mic->select('foo') && ($e = $@), 'EXAMINE non-existent');
 like($e, qr/\bNO\b/, 'got a NO on EXAMINE for non-existent');
 ok($mic->select('inbox.i1'), 'SELECT succeeds');
 ok($mic->examine('inbox.i1'), 'EXAMINE succeeds');
+my @raw = $mic->status('inbox.i1', qw(Messages uidnext uidvalidity));
+is(scalar(@raw), 2, 'got status response');
+like($raw[0], qr/\A\*\x20STATUS\x20inbox\.i1\x20
+        \(MESSAGES\x20\d+\x20UIDNEXT\x20\d+\x20UIDVALIDITY\x20\d+\)\r\n/sx);
+like($raw[1], qr/\A\S+ OK /, 'finished status response');
 
 my $ret = $mic->search('all') or BAIL_OUT "SEARCH FAIL $@";
 is_deeply($ret, [ 1 ], 'search all works');