about summary refs log tree commit homepage
path: root/t
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2020-08-29 20:32:19 +0000
committerEric Wong <e@yhbt.net>2020-08-30 07:31:46 +0000
commit374e1098fa03756e5626379ff6fe154785e16cfa (patch)
tree19066c6bb87f95840e4407e8862f8a83c0085354 /t
parent0a3008a577406622a31b2ca3c099f7d61e766522 (diff)
downloadpublic-inbox-374e1098fa03756e5626379ff6fe154785e16cfa.tar.gz
Quiet down logs from -imapd when clients are blindly
sending some unsupported flag conditions (e.g. "DRAFT",
"DELETED") specified in RFC 3501.
Diffstat (limited to 't')
-rw-r--r--t/imapd.t8
1 files changed, 7 insertions, 1 deletions
diff --git a/t/imapd.t b/t/imapd.t
index 4d627af7..8db72bd7 100644
--- a/t/imapd.t
+++ b/t/imapd.t
@@ -122,9 +122,11 @@ $ret = $mic->search('uid 1:1') or BAIL_OUT "SEARCH FAIL $@";
 is_deeply($ret, [ 1 ], 'search UID 1:1 works');
 $ret = $mic->search('uid 1:*') or BAIL_OUT "SEARCH FAIL $@";
 is_deeply($ret, [ 1 ], 'search UID 1:* works');
+$ret = $mic->search('DELETED') or BAIL_OUT "SEARCH FAIL $@";
+is_deeply($ret, [], 'searching for DELETED returns nothing');
 
 SKIP: {
-        skip 'Xapian missing', 7 if $level eq 'basic';
+        skip 'Xapian missing', 8 if $level eq 'basic';
         my $x = $mic->search(qw(smaller 99999));
         is_deeply($x, [1], 'SMALLER works with Xapian (hit)');
         $x = $mic->search(qw(smaller 9));
@@ -137,6 +139,10 @@ SKIP: {
 
         $x = $mic->search(qw(HEADER Message-ID testmessage@example.com));
         is_deeply($x, [1], 'HEADER Message-ID works');
+
+        $x = $mic->search(qw(DRAFT HEADER Message-ID testmessage@example.com));
+        is_deeply($x, [], 'impossible (DRAFT) key filters out match');
+
         $x = $mic->search(qw(HEADER Message-ID miss));
         is_deeply($x, [], 'HEADER Message-ID can miss');