6 "github.com/mjl-/mox/imapclient"
9func TestLsub(t *testing.T) {
13 tc.client.Login("mjl@mox.example", "testtest")
15 tc.transactf("bad", "lsub") // Missing params.
16 tc.transactf("bad", `lsub ""`) // Missing param.
17 tc.transactf("bad", `lsub "" x `) // Leftover data.
19 tc.transactf("ok", `lsub "" x*`)
22 tc.transactf("ok", "create a/b/c")
23 tc.transactf("ok", `lsub "" a/*`)
24 tc.xuntagged(imapclient.UntaggedLsub{Separator: '/', Mailbox: "a/b"}, imapclient.UntaggedLsub{Separator: '/', Mailbox: "a/b/c"})
27 tc.transactf("ok", "unsubscribe a")
28 tc.transactf("ok", "unsubscribe a/b")
29 tc.transactf("ok", `lsub "" a/%%`)
30 tc.xuntagged(imapclient.UntaggedLsub{Flags: []string{`\NoSelect`}, Separator: '/', Mailbox: "a/b"})
32 tc.transactf("ok", "unsubscribe a/b/c")
33 tc.transactf("ok", `lsub "" a/%%`)