diff options
author | Eric Wong <e@yhbt.net> | 2020-06-10 07:04:05 +0000 |
---|---|---|
committer | Eric Wong <e@yhbt.net> | 2020-06-13 07:55:45 +0000 |
commit | 7952dfc9ba1255400f85068364150bc5e0db869d (patch) | |
tree | 658e87da1395d772b1392f16cf8a965605bfef8f /t | |
parent | 9d154055ec44903052beaa4e2c1221f39d6d507a (diff) | |
download | public-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.t | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -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'); |