#6: fix E2E search result length assertion for IMAP4rev1 search
This commit is contained in:
1 parent
31a465e2e5
commit
5a7dcc002a
2 files changed
+5
-2
No files matched your search
@@ -175,8 +175,8 @@ func TestImapIdleAndCondStoreEndToEnd(t *testing.T) {
|
||||
if err != nil {
|
||||
t.Fatalf("SEARCH FLAGGED: %v", err)
|
||||
}
|
||||
if searchRes.Count != 1 {
|
||||
t.Fatalf("SEARCH FLAGGED expected 1 result, got %d", searchRes.Count)
|
||||
if len(searchRes.AllSeqNums()) != 1 {
|
||||
t.Fatalf("SEARCH FLAGGED expected 1 result, got %d (all=%v)", len(searchRes.AllSeqNums()), searchRes.AllSeqNums())
|
||||
}
|
||||
|
||||
// --- IDLE test -----------------------------------------------------------
|
||||
|
||||
@@ -5,6 +5,7 @@ import (
|
||||
"bytes"
|
||||
"context"
|
||||
"errors"
|
||||
"log"
|
||||
|
||||
"github.com/emersion/go-imap/v2"
|
||||
"github.com/emersion/go-imap/v2/imapserver"
|
||||
@@ -179,6 +180,8 @@ func (s *session) numSetIter(numSet imap.NumSet, messages []port.MessageRecord,
|
||||
if set != nil {
|
||||
contains = set.Contains(imap.UID(msg.UID))
|
||||
}
|
||||
default:
|
||||
log.Printf("[DEBUG numSetIter] UNKNOWN numSet type: %T (val=%#v)", numSet, numSet)
|
||||
}
|
||||
if contains {
|
||||
f(seqNum, msg)
|
||||
|
||||
Reference in new issue
Block a user