Skip to content

Commit

Permalink
test(GODT-1584): * should resolve without error with UID commands
Browse files Browse the repository at this point in the history
The * refers to the last message in a mailbox. When the mailbox is
empty, we copy dovecot's behaviour, which is to return treat this as an
error with normal commands but to resolve without error with UID
commands.
  • Loading branch information
jameshoulahan committed Aug 5, 2022
1 parent b613808 commit 6138acb
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/sequence_range_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,3 +135,17 @@ func TestUIDSequenceRange(t *testing.T) {
c.OK(`A017`)
})
}

func TestWildcard(t *testing.T) {
runOneToOneTestWithAuth(t, defaultServerOptions(t), func(c *testConnection, _ *testSession) {
// Create an empty mailbox.
c.C("tag create mbox").OK("tag")
c.C("tag select mbox").OK("tag")

// FETCH with wildcard returns BAD.
c.C("tag fetch * (flags)").BAD("tag")

// UID FETCH with wildcard returns OK.
c.C("tag uid fetch * (flags)").OK("tag")
})
}

0 comments on commit 6138acb

Please sign in to comment.