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:50 +0000
committerEric Wong <e@yhbt.net>2020-06-13 07:55:45 +0000
commit95da261efcf7c15b5e522344e207a3a04a374961 (patch)
tree34616e111e84d8bbbd1d5f75f2e683e225c7cb1d /t
parentde4084d8f5d9765db61c446fc03b80dbb163ee1b (diff)
downloadpublic-inbox-95da261efcf7c15b5e522344e207a3a04a374961.tar.gz
Since it seems somewhat common for IMAP clients to limit
searches by sent Date: or INTERNALDATE, we can rely on
the NNTP/WWW-optimized overview DB.

For other queries, we'll have to depend on the Xapian DB.
Diffstat (limited to 't')
-rw-r--r--t/imapd.t6
1 files changed, 6 insertions, 0 deletions
diff --git a/t/imapd.t b/t/imapd.t
index 11b56b09..2546ab51 100644
--- a/t/imapd.t
+++ b/t/imapd.t
@@ -326,6 +326,12 @@ Content-Type: message/rfc822\r
 Content-Disposition: attachment; filename="embed2x\.eml"\r
 \r
 EOF
+
+        my @hits = $mic->search('SENTON' => '18-Apr-2020');
+        is_deeply(\@hits, [ $uidnext ], 'search with date condition works');
+        ok($mic->examine($ng), 'EXAMINE on dummy');
+        @hits = $mic->search('SENTSINCE' => '18-Apr-2020');
+        is_deeply(\@hits, [], 'search on dummy with condition works');
 }); # each_inbox
 
 # message sequence numbers :<