mirror of
https://github.com/mjl-/mox.git
synced 2025-07-10 09:54:40 +03:00
only send \NonExistent for IMAP4rev2, and automatically subscribe to imported mailboxes
This commit is contained in:
@ -13,8 +13,12 @@ func TestDelete(t *testing.T) {
|
||||
tc2 := startNoSwitchboard(t)
|
||||
defer tc2.close()
|
||||
|
||||
tc3 := startNoSwitchboard(t)
|
||||
defer tc3.close()
|
||||
|
||||
tc.client.Login("mjl@mox.example", "testtest")
|
||||
tc2.client.Login("mjl@mox.example", "testtest")
|
||||
tc3.client.Login("mjl@mox.example", "testtest")
|
||||
|
||||
tc.transactf("bad", "delete") // Missing mailbox.
|
||||
tc.transactf("no", "delete inbox") // Cannot delete inbox.
|
||||
@ -26,14 +30,18 @@ func TestDelete(t *testing.T) {
|
||||
|
||||
tc.client.Create("a/b")
|
||||
tc2.transactf("ok", "noop") // Drain changes.
|
||||
tc3.transactf("ok", "noop")
|
||||
|
||||
// ../rfc/9051:2000
|
||||
tc.transactf("no", "delete a") // Still has child.
|
||||
tc.xcode("HASCHILDREN")
|
||||
|
||||
tc3.client.Enable("IMAP4rev2") // For \NonExistent support.
|
||||
tc.transactf("ok", "delete a/b")
|
||||
tc2.transactf("ok", "noop")
|
||||
tc2.xuntagged(imapclient.UntaggedList{Flags: []string{`\NonExistent`}, Separator: '/', Mailbox: "a/b"})
|
||||
tc2.xuntagged() // No IMAP4rev2, no \NonExistent.
|
||||
tc3.transactf("ok", "noop")
|
||||
tc3.xuntagged(imapclient.UntaggedList{Flags: []string{`\NonExistent`}, Separator: '/', Mailbox: "a/b"})
|
||||
|
||||
tc.transactf("no", "delete a/b") // Already removed.
|
||||
tc.transactf("ok", "delete a") // Parent can now be removed.
|
||||
|
Reference in New Issue
Block a user