8func TestCompress(t *testing.T) {
12 tc.client.Login("mjl@mox.example", password0)
14 tc.transactf("bad", "compress")
15 tc.transactf("bad", "compress bogus ")
16 tc.transactf("no", "compress bogus")
18 tc.client.CompressDeflate()
19 tc.transactf("no", "compress deflate") // Cannot have multiple.
20 tc.xcode("COMPRESSIONACTIVE")
22 tc.client.Select("inbox")
23 tc.transactf("ok", "append inbox (\\seen) {%d+}\r\n%s", len(exampleMsg), exampleMsg)
24 tc.transactf("ok", "noop")
25 tc.transactf("ok", "fetch 1 body.peek[1]")
28func TestCompressStartTLS(t *testing.T) {
32 tc.client.Starttls(&tls.Config{InsecureSkipVerify: true})
33 tc.client.Login("mjl@mox.example", password0)
34 tc.client.CompressDeflate()
35 tc.client.Select("inbox")
36 tc.transactf("ok", "append inbox (\\seen) {%d+}\r\n%s", len(exampleMsg), exampleMsg)
37 tc.transactf("ok", "noop")
38 tc.transactf("ok", "fetch 1 body.peek[1]")