Commit c9900a55 c9900a551f5dd5350713d615bcda1bd9a05368a1 by Sergey Poznyakoff

Updated for the new contents of mbox1

1 parent 45820e04
...@@ -27,22 +27,25 @@ mu_prepare_spools ...@@ -27,22 +27,25 @@ mu_prepare_spools
27 mu_exec -retcode 1 -message "frm" "Foo Bar\tJabberwocky"\ 27 mu_exec -retcode 1 -message "frm" "Foo Bar\tJabberwocky"\
28 "Bar\tRe: Jabberwocky"\ 28 "Bar\tRe: Jabberwocky"\
29 "Sergey Poznyakoff\tSimple MIME"\ 29 "Sergey Poznyakoff\tSimple MIME"\
30 "Sergey Poznyakoff\tNested MIME" 30 "Sergey Poznyakoff\tNested MIME"\
31 "Sergey Poznyakoff\tEmpty MIME Parts"
31 32
32 mu_exec -retcode 1 -message "frm -n" -arg -n \ 33 mu_exec -retcode 1 -message "frm -n" -arg -n \
33 "1: Foo Bar\tJabberwocky"\ 34 "1: Foo Bar\tJabberwocky"\
34 "2: Bar\tRe: Jabberwocky"\ 35 "2: Bar\tRe: Jabberwocky"\
35 "3: Sergey Poznyakoff\tSimple MIME"\ 36 "3: Sergey Poznyakoff\tSimple MIME"\
36 "4: Sergey Poznyakoff\tNested MIME" 37 "4: Sergey Poznyakoff\tNested MIME"\
38 "5: Sergey Poznyakoff\tEmpty MIME Parts"
37 39
38 mu_exec -retcode 1 -message "frm -l" -arg -l \ 40 mu_exec -retcode 1 -message "frm -l" -arg -l \
39 "(Bar) Foo Bar\tJabberwocky"\ 41 "(Bar) Foo Bar\tJabberwocky"\
40 "(Foo Bar) Bar\tRe: Jabberwocky"\ 42 "(Foo Bar) Bar\tRe: Jabberwocky"\
41 "(Foo Bar) Sergey Poznyakoff\tSimple MIME"\ 43 "(Foo Bar) Sergey Poznyakoff\tSimple MIME"\
42 "(Foo Bar) Sergey Poznyakoff\tNested MIME"\ 44 "(Foo Bar) Sergey Poznyakoff\tNested MIME"\
45 "(Foo Bar) Sergey Poznyakoff\tEmpty MIME Parts"
43 46
44 mu_exec -retcode 1 -message "frm -qS" -arg -qS \ 47 mu_exec -retcode 1 -message "frm -qS" -arg -qS \
45 "You have 4 messages" 48 "You have 5 messages"
46 49
47 mu_exec -retcode 1 -arg %mbox -message "frm %mbox" \ 50 mu_exec -retcode 1 -arg %mbox -message "frm %mbox" \
48 "Sergey Poznyakoff\tMBOX" 51 "Sergey Poznyakoff\tMBOX"
......
...@@ -28,7 +28,8 @@ mu_exec -message "from" \ ...@@ -28,7 +28,8 @@ mu_exec -message "from" \
28 "Foo Bar\tJabberwocky"\ 28 "Foo Bar\tJabberwocky"\
29 "Bar\tRe: Jabberwocky"\ 29 "Bar\tRe: Jabberwocky"\
30 "Sergey Poznyakoff\tSimple MIME"\ 30 "Sergey Poznyakoff\tSimple MIME"\
31 "Sergey Poznyakoff\tNested MIME" 31 "Sergey Poznyakoff\tNested MIME"\
32 "Sergey Poznyakoff\tEmpty MIME Parts"
32 33
33 mu_exec -message "from mbox" -arg %mbox \ 34 mu_exec -message "from mbox" -arg %mbox \
34 "Sergey Poznyakoff\tMBOX" 35 "Sergey Poznyakoff\tMBOX"
......
...@@ -43,14 +43,14 @@ imap4d_test "STATUS INBOX (MESSAGES RECENT UNSEEN UIDVALIDITY UIDNEXT)" \ ...@@ -43,14 +43,14 @@ imap4d_test "STATUS INBOX (MESSAGES RECENT UNSEEN UIDVALIDITY UIDNEXT)" \
43 "OK" 43 "OK"
44 44
45 imap4d_test "STATUS mbox1 (MESSAGES RECENT UNSEEN UIDNEXT)" \ 45 imap4d_test "STATUS mbox1 (MESSAGES RECENT UNSEEN UIDNEXT)" \
46 "STATUS mbox1 (MESSAGES 4 RECENT 4 UNSEEN 4 UIDNEXT 5 )" \ 46 "STATUS mbox1 (MESSAGES 5 RECENT 5 UNSEEN 5 UIDNEXT 6 )" \
47 "OK" 47 "OK"
48 48
49 imap4d_test "EXAMINE mbox1" \ 49 imap4d_test "EXAMINE mbox1" \
50 "4 EXISTS"\ 50 "5 EXISTS"\
51 "4 RECENT"\ 51 "5 RECENT"\
52 -re {OK \[UIDVALIDITY [0-9]+\] UID valididy status}\ 52 -re {OK \[UIDVALIDITY [0-9]+\] UID valididy status}\
53 "OK \[UIDNEXT 5\] Predicted next uid"\ 53 "OK \[UIDNEXT 6\] Predicted next uid"\
54 "OK \[UNSEEN 1\] first unseen messsage"\ 54 "OK \[UNSEEN 1\] first unseen messsage"\
55 "FLAGS (\\Answered \\Flagged \\Deleted \\Seen \\Draft)"\ 55 "FLAGS (\\Answered \\Flagged \\Deleted \\Seen \\Draft)"\
56 "OK \[PERMANENTFLAGS ()\] No Permanent flags"\ 56 "OK \[PERMANENTFLAGS ()\] No Permanent flags"\
......
...@@ -33,10 +33,10 @@ imap4d_start ...@@ -33,10 +33,10 @@ imap4d_start
33 imap4d_auth "user!passwd" "guessme" 33 imap4d_auth "user!passwd" "guessme"
34 34
35 imap4d_test "SELECT mbox1" \ 35 imap4d_test "SELECT mbox1" \
36 "4 EXISTS"\ 36 "5 EXISTS"\
37 "4 RECENT"\ 37 "5 RECENT"\
38 -re {OK \[UIDVALIDITY [0-9]+\] UID valididy status}\ 38 -re {OK \[UIDVALIDITY [0-9]+\] UID valididy status}\
39 "OK \[UIDNEXT 5\] Predicted next uid"\ 39 "OK \[UIDNEXT 6\] Predicted next uid"\
40 "OK \[UNSEEN 1\] first unseen messsage"\ 40 "OK \[UNSEEN 1\] first unseen messsage"\
41 "FLAGS (\\Answered \\Flagged \\Deleted \\Seen \\Draft)"\ 41 "FLAGS (\\Answered \\Flagged \\Deleted \\Seen \\Draft)"\
42 "OK \[PERMANENTFLAGS (\\Answered \\Deleted \\Seen)\] Permanent flags" \ 42 "OK \[PERMANENTFLAGS (\\Answered \\Deleted \\Seen)\] Permanent flags" \
...@@ -46,12 +46,14 @@ imap4d_test "STORE 2:* +FLAGS (\\Deleted)"\ ...@@ -46,12 +46,14 @@ imap4d_test "STORE 2:* +FLAGS (\\Deleted)"\
46 "2 FETCH (FLAGS (\\Deleted \\Recent))"\ 46 "2 FETCH (FLAGS (\\Deleted \\Recent))"\
47 "3 FETCH (FLAGS (\\Deleted \\Recent))"\ 47 "3 FETCH (FLAGS (\\Deleted \\Recent))"\
48 "4 FETCH (FLAGS (\\Deleted \\Recent))"\ 48 "4 FETCH (FLAGS (\\Deleted \\Recent))"\
49 "5 FETCH (FLAGS (\\Deleted \\Recent))"\
49 "OK" 50 "OK"
50 51
51 imap4d_test "EXPUNGE"\ 52 imap4d_test "EXPUNGE"\
52 "2 EXPUNGED"\ 53 "2 EXPUNGED"\
53 "2 EXPUNGED"\ 54 "2 EXPUNGED"\
54 "2 EXPUNGED"\ 55 "2 EXPUNGED"\
56 "2 EXPUNGED"\
55 "1 EXISTS"\ 57 "1 EXISTS"\
56 "1 RECENT"\ 58 "1 RECENT"\
57 "OK" 59 "OK"
...@@ -60,8 +62,9 @@ imap4d_test "CLOSE" ...@@ -60,8 +62,9 @@ imap4d_test "CLOSE"
60 62
61 imap4d_test "SELECT mbox1" \ 63 imap4d_test "SELECT mbox1" \
62 "1 EXISTS"\ 64 "1 EXISTS"\
65 "0 RECENT"\
63 -re {OK \[UIDVALIDITY [0-9]+\] UID valididy status}\ 66 -re {OK \[UIDVALIDITY [0-9]+\] UID valididy status}\
64 "OK \[UIDNEXT 5\] Predicted next uid"\ 67 "OK \[UIDNEXT 6\] Predicted next uid"\
65 "OK \[UNSEEN 1\] first unseen messsage"\ 68 "OK \[UNSEEN 1\] first unseen messsage"\
66 "FLAGS (\\Answered \\Flagged \\Deleted \\Seen \\Draft)"\ 69 "FLAGS (\\Answered \\Flagged \\Deleted \\Seen \\Draft)"\
67 "OK \[PERMANENTFLAGS (\\Answered \\Deleted \\Seen)\] Permanent flags" \ 70 "OK \[PERMANENTFLAGS (\\Answered \\Deleted \\Seen)\] Permanent flags" \
......
...@@ -32,10 +32,10 @@ imap4d_start ...@@ -32,10 +32,10 @@ imap4d_start
32 imap4d_auth "user!passwd" "guessme" 32 imap4d_auth "user!passwd" "guessme"
33 33
34 imap4d_test "SELECT mbox1" \ 34 imap4d_test "SELECT mbox1" \
35 "4 EXISTS"\ 35 "5 EXISTS"\
36 "4 RECENT"\ 36 "5 RECENT"\
37 -re {OK \[UIDVALIDITY [0-9]+\] UID valididy status}\ 37 -re {OK \[UIDVALIDITY [0-9]+\] UID valididy status}\
38 "OK \[UIDNEXT 5\] Predicted next uid"\ 38 "OK \[UIDNEXT 6\] Predicted next uid"\
39 "OK \[UNSEEN 1\] first unseen messsage"\ 39 "OK \[UNSEEN 1\] first unseen messsage"\
40 "FLAGS (\\Answered \\Flagged \\Deleted \\Seen \\Draft)"\ 40 "FLAGS (\\Answered \\Flagged \\Deleted \\Seen \\Draft)"\
41 "OK \[PERMANENTFLAGS (\\Answered \\Deleted \\Seen)\] Permanent flags" \ 41 "OK \[PERMANENTFLAGS (\\Answered \\Deleted \\Seen)\] Permanent flags" \
...@@ -70,6 +70,7 @@ imap4d_test "FETCH 1:* ENVELOPE"\ ...@@ -70,6 +70,7 @@ imap4d_test "FETCH 1:* ENVELOPE"\
70 "2 FETCH (ENVELOPE (\"Fri, 28 Dec 2001 23:28:08 +0200\" \"Re: Jabberwocky\" ((\"Bar\" NIL \"bar\" \"dontmailme.org\")) ((\"Bar\" NIL \"bar\" \"dontmailme.org\")) ((\"Bar\" NIL \"bar\" \"dontmailme.org\")) ((\"Foo Bar\" NIL \"foobar\" \"nonexistent.net\")) NIL NIL NIL \"<200112232808.fERKR9N16790@dontmailme.org>\"))"\ 70 "2 FETCH (ENVELOPE (\"Fri, 28 Dec 2001 23:28:08 +0200\" \"Re: Jabberwocky\" ((\"Bar\" NIL \"bar\" \"dontmailme.org\")) ((\"Bar\" NIL \"bar\" \"dontmailme.org\")) ((\"Bar\" NIL \"bar\" \"dontmailme.org\")) ((\"Foo Bar\" NIL \"foobar\" \"nonexistent.net\")) NIL NIL NIL \"<200112232808.fERKR9N16790@dontmailme.org>\"))"\
71 "3 FETCH (ENVELOPE (\"Sat, 13 Jul 2002 00:43:18 +0300\" \"Simple MIME\" ((\"Sergey Poznyakoff\" NIL \"gray\" \"Mirddin.farlep.net\")) ((\"Sergey Poznyakoff\" NIL \"gray\" \"Mirddin.farlep.net\")) ((\"Sergey Poznyakoff\" NIL \"gray\" \"Mirddin.farlep.net\")) ((\"Foo Bar\" NIL \"foobar\" \"nonexistent.net\")) NIL NIL NIL \"<200207122143.g6CLhIb05086@Mirddin.farlep.net>\"))"\ 71 "3 FETCH (ENVELOPE (\"Sat, 13 Jul 2002 00:43:18 +0300\" \"Simple MIME\" ((\"Sergey Poznyakoff\" NIL \"gray\" \"Mirddin.farlep.net\")) ((\"Sergey Poznyakoff\" NIL \"gray\" \"Mirddin.farlep.net\")) ((\"Sergey Poznyakoff\" NIL \"gray\" \"Mirddin.farlep.net\")) ((\"Foo Bar\" NIL \"foobar\" \"nonexistent.net\")) NIL NIL NIL \"<200207122143.g6CLhIb05086@Mirddin.farlep.net>\"))"\
72 "4 FETCH (ENVELOPE (\"Sat, 13 Jul 2002 00:50:58 +0300\" \"Nested MIME\" ((\"Sergey Poznyakoff\" NIL \"gray\" \"Mirddin.farlep.net\")) ((\"Sergey Poznyakoff\" NIL \"gray\" \"Mirddin.farlep.net\")) ((\"Sergey Poznyakoff\" NIL \"gray\" \"Mirddin.farlep.net\")) ((\"Foo Bar\" NIL \"foobar\" \"nonexistent.net\")) NIL NIL NIL \"<200207122150.g6CLowb05126@Mirddin.farlep.net>\"))"\ 72 "4 FETCH (ENVELOPE (\"Sat, 13 Jul 2002 00:50:58 +0300\" \"Nested MIME\" ((\"Sergey Poznyakoff\" NIL \"gray\" \"Mirddin.farlep.net\")) ((\"Sergey Poznyakoff\" NIL \"gray\" \"Mirddin.farlep.net\")) ((\"Sergey Poznyakoff\" NIL \"gray\" \"Mirddin.farlep.net\")) ((\"Foo Bar\" NIL \"foobar\" \"nonexistent.net\")) NIL NIL NIL \"<200207122150.g6CLowb05126@Mirddin.farlep.net>\"))"\
73 "5 FETCH (ENVELOPE (\"Sat, 13 Jul 2002 00:43:18 +0300\" \"Empty MIME Parts\" ((\"Sergey Poznyakoff\" NIL \"gray\" \"Mirddin.farlep.net\")) ((\"Sergey Poznyakoff\" NIL \"gray\" \"Mirddin.farlep.net\")) ((\"Sergey Poznyakoff\" NIL \"gray\" \"Mirddin.farlep.net\")) ((\"Foo Bar\" NIL \"foobar\" \"nonexistent.net\")) NIL NIL NIL \"<200207122143.g6CLhIb05086@Mirddin.farlep.net>\"))"\
73 "OK" 74 "OK"
74 75
75 # ALL Macro equivalent to: (FLAGS INTERNALDATE 76 # ALL Macro equivalent to: (FLAGS INTERNALDATE
...@@ -80,6 +81,7 @@ imap4d_test "FETCH 1:\* ALL"\ ...@@ -80,6 +81,7 @@ imap4d_test "FETCH 1:\* ALL"\
80 "2 FETCH (FLAGS (\\Recent) INTERNALDATE \"28-Dec-2001 23:28:09 +0000\" RFC822.SIZE 548 ENVELOPE (\"Fri, 28 Dec 2001 23:28:08 +0200\" \"Re: Jabberwocky\" ((\"Bar\" NIL \"bar\" \"dontmailme.org\")) ((\"Bar\" NIL \"bar\" \"dontmailme.org\")) ((\"Bar\" NIL \"bar\" \"dontmailme.org\")) ((\"Foo Bar\" NIL \"foobar\" \"nonexistent.net\")) NIL NIL NIL \"<200112232808.fERKR9N16790@dontmailme.org>\"))"\ 81 "2 FETCH (FLAGS (\\Recent) INTERNALDATE \"28-Dec-2001 23:28:09 +0000\" RFC822.SIZE 548 ENVELOPE (\"Fri, 28 Dec 2001 23:28:08 +0200\" \"Re: Jabberwocky\" ((\"Bar\" NIL \"bar\" \"dontmailme.org\")) ((\"Bar\" NIL \"bar\" \"dontmailme.org\")) ((\"Bar\" NIL \"bar\" \"dontmailme.org\")) ((\"Foo Bar\" NIL \"foobar\" \"nonexistent.net\")) NIL NIL NIL \"<200112232808.fERKR9N16790@dontmailme.org>\"))"\
81 "3 FETCH (FLAGS (\\Recent) INTERNALDATE \"13-Jul-2002 00:43:18 +0000\" RFC822.SIZE 1668 ENVELOPE (\"Sat, 13 Jul 2002 00:43:18 +0300\" \"Simple MIME\" ((\"Sergey Poznyakoff\" NIL \"gray\" \"Mirddin.farlep.net\")) ((\"Sergey Poznyakoff\" NIL \"gray\" \"Mirddin.farlep.net\")) ((\"Sergey Poznyakoff\" NIL \"gray\" \"Mirddin.farlep.net\")) ((\"Foo Bar\" NIL \"foobar\" \"nonexistent.net\")) NIL NIL NIL \"<200207122143.g6CLhIb05086@Mirddin.farlep.net>\"))"\ 82 "3 FETCH (FLAGS (\\Recent) INTERNALDATE \"13-Jul-2002 00:43:18 +0000\" RFC822.SIZE 1668 ENVELOPE (\"Sat, 13 Jul 2002 00:43:18 +0300\" \"Simple MIME\" ((\"Sergey Poznyakoff\" NIL \"gray\" \"Mirddin.farlep.net\")) ((\"Sergey Poznyakoff\" NIL \"gray\" \"Mirddin.farlep.net\")) ((\"Sergey Poznyakoff\" NIL \"gray\" \"Mirddin.farlep.net\")) ((\"Foo Bar\" NIL \"foobar\" \"nonexistent.net\")) NIL NIL NIL \"<200207122143.g6CLhIb05086@Mirddin.farlep.net>\"))"\
82 "4 FETCH (FLAGS (\\Recent) INTERNALDATE \"13-Jul-2002 00:50:58 +0000\" RFC822.SIZE 3568 ENVELOPE (\"Sat, 13 Jul 2002 00:50:58 +0300\" \"Nested MIME\" ((\"Sergey Poznyakoff\" NIL \"gray\" \"Mirddin.farlep.net\")) ((\"Sergey Poznyakoff\" NIL \"gray\" \"Mirddin.farlep.net\")) ((\"Sergey Poznyakoff\" NIL \"gray\" \"Mirddin.farlep.net\")) ((\"Foo Bar\" NIL \"foobar\" \"nonexistent.net\")) NIL NIL NIL \"<200207122150.g6CLowb05126@Mirddin.farlep.net>\"))"\ 83 "4 FETCH (FLAGS (\\Recent) INTERNALDATE \"13-Jul-2002 00:50:58 +0000\" RFC822.SIZE 3568 ENVELOPE (\"Sat, 13 Jul 2002 00:50:58 +0300\" \"Nested MIME\" ((\"Sergey Poznyakoff\" NIL \"gray\" \"Mirddin.farlep.net\")) ((\"Sergey Poznyakoff\" NIL \"gray\" \"Mirddin.farlep.net\")) ((\"Sergey Poznyakoff\" NIL \"gray\" \"Mirddin.farlep.net\")) ((\"Foo Bar\" NIL \"foobar\" \"nonexistent.net\")) NIL NIL NIL \"<200207122150.g6CLowb05126@Mirddin.farlep.net>\"))"\
84 "5 FETCH (FLAGS (\\Recent) INTERNALDATE \"13-Jul-2002 00:43:18 +0000\" RFC822.SIZE 937 ENVELOPE (\"Sat, 13 Jul 2002 00:43:18 +0300\" \"Empty MIME Parts\" ((\"Sergey Poznyakoff\" NIL \"gray\" \"Mirddin.farlep.net\")) ((\"Sergey Poznyakoff\" NIL \"gray\" \"Mirddin.farlep.net\")) ((\"Sergey Poznyakoff\" NIL \"gray\" \"Mirddin.farlep.net\")) ((\"Foo Bar\" NIL \"foobar\" \"nonexistent.net\")) NIL NIL NIL \"<200207122143.g6CLhIb05086@Mirddin.farlep.net>\"))"\
83 "OK" 85 "OK"
84 86
85 # BODYSTRUCTURE The [MIME-IMB] body structure of the message. This 87 # BODYSTRUCTURE The [MIME-IMB] body structure of the message. This
...@@ -103,12 +105,17 @@ imap4d_test "FETCH 4 BODYSTRUCTURE"\ ...@@ -103,12 +105,17 @@ imap4d_test "FETCH 4 BODYSTRUCTURE"\
103 "4 FETCH (BODYSTRUCTURE ((\"text\" \"plain\" (\"name\" \"msg.21\" \"charset\" \"us-ascii\") \"<5122.1026510654.2@Mirddin.farlep.net>\" \"Father William Part I\" \"7BIT\" 353 11 NIL NIL NIL)((\"application\" \"octet-stream\" (\"name\" \"msg.22\") \"<5122.1026510654.4@Mirddin.farlep.net>\" \"Father William Part II\" \"base64\" 488 NIL NIL NIL)((\"application\" \"octet-stream\" (\"name\" \"msg.23\") \"<5122.1026510654.6@Mirddin.farlep.net>\" \"Father William Part III\" \"base64\" 492 NIL NIL NIL)(\"application\" \"octet-stream\" (\"name\" \"msg.24\") \"<5122.1026510654.7@Mirddin.farlep.net>\" \"Father William Part IV\" \"base64\" 504 NIL NIL NIL) \"mixed\" (\"boundary\" \"----- =_aaaaaaaaaa2\") NIL NIL) \"mixed\" (\"boundary\" \"----- =_aaaaaaaaaa1\") NIL NIL) \"mixed\" (\"boundary\" \"----- =_aaaaaaaaaa0\") NIL NIL))"\ 105 "4 FETCH (BODYSTRUCTURE ((\"text\" \"plain\" (\"name\" \"msg.21\" \"charset\" \"us-ascii\") \"<5122.1026510654.2@Mirddin.farlep.net>\" \"Father William Part I\" \"7BIT\" 353 11 NIL NIL NIL)((\"application\" \"octet-stream\" (\"name\" \"msg.22\") \"<5122.1026510654.4@Mirddin.farlep.net>\" \"Father William Part II\" \"base64\" 488 NIL NIL NIL)((\"application\" \"octet-stream\" (\"name\" \"msg.23\") \"<5122.1026510654.6@Mirddin.farlep.net>\" \"Father William Part III\" \"base64\" 492 NIL NIL NIL)(\"application\" \"octet-stream\" (\"name\" \"msg.24\") \"<5122.1026510654.7@Mirddin.farlep.net>\" \"Father William Part IV\" \"base64\" 504 NIL NIL NIL) \"mixed\" (\"boundary\" \"----- =_aaaaaaaaaa2\") NIL NIL) \"mixed\" (\"boundary\" \"----- =_aaaaaaaaaa1\") NIL NIL) \"mixed\" (\"boundary\" \"----- =_aaaaaaaaaa0\") NIL NIL))"\
104 "OK" 106 "OK"
105 107
108 imap4d_test "FETCH 5 BODYSTRUCTURE"\
109 "5 FETCH (BODYSTRUCTURE ((\"text\" \"plain\" (\"name\" \"empty\" \"charset\" \"us-ascii\") \"<5082.1026510189.1@Mirddin.farlep.net>\" \"Empty part\" \"7BIT\" 0 0 NIL NIL NIL)(\"text\" \"plain\" (\"name\" \"single.line\" \"charset\" \"\us-ascii\") \"<5082.1026510189.2@Mirddin.farlep.net>\" \"Single line part\" \"7BIT\" 2 1 NIL NIL NIL) \"mixed\" (\"boundary\" \"----- =_aaaaaaaaaa0\") NIL NIL))"\
110 "OK"
111
106 # BODY The text of a particular body section. 112 # BODY The text of a particular body section.
107 imap4d_test "FETCH 1:* BODY"\ 113 imap4d_test "FETCH 1:* BODY"\
108 "1 FETCH (BODY (\"TEXT\" \"PLAIN\" (\"CHARSET\" \"US-ASCII\") NIL NIL \"7BIT\" 972 35))"\ 114 "1 FETCH (BODY (\"TEXT\" \"PLAIN\" (\"CHARSET\" \"US-ASCII\") NIL NIL \"7BIT\" 972 35))"\
109 "2 FETCH (BODY (\"TEXT\" \"PLAIN\" (\"CHARSET\" \"US-ASCII\") NIL NIL \"7BIT\" 219 4))"\ 115 "2 FETCH (BODY (\"TEXT\" \"PLAIN\" (\"CHARSET\" \"US-ASCII\") NIL NIL \"7BIT\" 219 4))"\
110 "3 FETCH (BODY ((\"text\" \"plain\" (\"name\" \"msg.1\" \"charset\" \"us-ascii\") \"<5082.1026510189.1@Mirddin.farlep.net>\" \"How doth\" \"7BIT\" 241 10)(\"application\" \"octet-stream\" (\"name\" \"msg.21\") \"<5082.1026510189.2@Mirddin.farlep.net>\" \"Father William Part I\" \"base64\" 470) \"mixed\" NIL NIL NIL))"\ 116 "3 FETCH (BODY ((\"text\" \"plain\" (\"name\" \"msg.1\" \"charset\" \"us-ascii\") \"<5082.1026510189.1@Mirddin.farlep.net>\" \"How doth\" \"7BIT\" 241 10)(\"application\" \"octet-stream\" (\"name\" \"msg.21\") \"<5082.1026510189.2@Mirddin.farlep.net>\" \"Father William Part I\" \"base64\" 470) \"mixed\" NIL NIL NIL))"\
111 "4 FETCH (BODY ((\"text\" \"plain\" (\"name\" \"msg.21\" \"charset\" \"us-ascii\") \"<5122.1026510654.2@Mirddin.farlep.net>\" \"Father William Part I\" \"7BIT\" 353 11)((\"application\" \"octet-stream\" (\"name\" \"msg.22\") \"<5122.1026510654.4@Mirddin.farlep.net>\" \"Father William Part II\" \"base64\" 488)((\"application\" \"octet-stream\" (\"name\" \"msg.23\") \"<5122.1026510654.6@Mirddin.farlep.net>\" \"Father William Part III\" \"base64\" 492)(\"application\" \"octet-stream\" (\"name\" \"msg.24\") \"<5122.1026510654.7@Mirddin.farlep.net>\" \"Father William Part IV\" \"base64\" 504) \"mixed\" NIL NIL NIL) \"mixed\" NIL NIL NIL) \"mixed\" NIL NIL NIL))"\ 117 "4 FETCH (BODY ((\"text\" \"plain\" (\"name\" \"msg.21\" \"charset\" \"us-ascii\") \"<5122.1026510654.2@Mirddin.farlep.net>\" \"Father William Part I\" \"7BIT\" 353 11)((\"application\" \"octet-stream\" (\"name\" \"msg.22\") \"<5122.1026510654.4@Mirddin.farlep.net>\" \"Father William Part II\" \"base64\" 488)((\"application\" \"octet-stream\" (\"name\" \"msg.23\") \"<5122.1026510654.6@Mirddin.farlep.net>\" \"Father William Part III\" \"base64\" 492)(\"application\" \"octet-stream\" (\"name\" \"msg.24\") \"<5122.1026510654.7@Mirddin.farlep.net>\" \"Father William Part IV\" \"base64\" 504) \"mixed\" NIL NIL NIL) \"mixed\" NIL NIL NIL) \"mixed\" NIL NIL NIL))"\
118 "5 FETCH (BODY ((\"text\" \"plain\" (\"name\" \"empty\" \"charset\" \"us-ascii\") \"<5082.1026510189.1@Mirddin.farlep.net>\" \"Empty part\" \"7BIT\" 0 0)(\"text\" \"plain\" (\"name\" \"single.line\" \"charset\" \"\us-ascii\") \"<5082.1026510189.2@Mirddin.farlep.net>\" \"Single line part\" \"7BIT\" 2 1) \"mixed\" NIL NIL NIL))"\
112 "OK" 119 "OK"
113 120
114 # BODY.PEEK[<section>]<<partial>> 121 # BODY.PEEK[<section>]<<partial>>
...@@ -386,6 +393,17 @@ imap4d_test "FETCH 4 BODY\[2.2.TEXT\]"\ ...@@ -386,6 +393,17 @@ imap4d_test "FETCH 4 BODY\[2.2.TEXT\]"\
386 ")"\ 393 ")"\
387 "OK" 394 "OK"
388 395
396 imap4d_test "FETCH 5 BODY\[1.TEXT\]"\
397 "5 FETCH (FLAGS (\\Seen) BODY\[1.TEXT\] \"\")"\
398 "OK"
399
400 imap4d_test "FETCH 5 BODY\[2.TEXT\]"\
401 "5 FETCH (BODY\[2.TEXT\] {2}"\
402 -literal\
403 ""\
404 ")"\
405 "OK"
406
389 ############### 407 ###############
390 # Test RFC822 operations 408 # Test RFC822 operations
391 409
...@@ -396,6 +414,7 @@ imap4d_test "STORE 1:* -FLAGS (\\Seen)"\ ...@@ -396,6 +414,7 @@ imap4d_test "STORE 1:* -FLAGS (\\Seen)"\
396 "2 FETCH (FLAGS (\\Recent))"\ 414 "2 FETCH (FLAGS (\\Recent))"\
397 "3 FETCH (FLAGS (\\Recent))"\ 415 "3 FETCH (FLAGS (\\Recent))"\
398 "4 FETCH (FLAGS (\\Recent))"\ 416 "4 FETCH (FLAGS (\\Recent))"\
417 "5 FETCH (FLAGS (\\Recent))"\
399 "OK" 418 "OK"
400 419
401 # RFC822 Functionally equivalent to BODY[], differing in the 420 # RFC822 Functionally equivalent to BODY[], differing in the
......
...@@ -26,7 +26,7 @@ mail_command "set folder=\"$MU_FOLDER_DIR\"" ...@@ -26,7 +26,7 @@ mail_command "set folder=\"$MU_FOLDER_DIR\""
26 mail_test "folders" -re "one.*two" 26 mail_test "folders" -re "one.*two"
27 27
28 mail_test "file +one" \ 28 mail_test "file +one" \
29 "Held 4 messages in $MU_SPOOL_DIR/mbox1" 29 "Held 5 messages in $MU_SPOOL_DIR/mbox1"
30 mail_test "sum" \ 30 mail_test "sum" \
31 "\"$MU_FOLDER_DIR/one\": 1 message 1 new" 31 "\"$MU_FOLDER_DIR/one\": 1 message 1 new"
32 mail_test "headers" \ 32 mail_test "headers" \
......
...@@ -21,24 +21,26 @@ mail_start "--file=%mbox1" ...@@ -21,24 +21,26 @@ mail_start "--file=%mbox1"
21 # Delete first and last message and quit 21 # Delete first and last message and quit
22 mail_command "delete 1 4" 22 mail_command "delete 1 4"
23 mail_test -noprompt "quit" \ 23 mail_test -noprompt "quit" \
24 "Held 2 messages in $MU_SPOOL_DIR/mbox1" 24 "Held 3 messages in $MU_SPOOL_DIR/mbox1"
25 25
26 # Start again using the same mailbox 26 # Start again using the same mailbox
27 mail_start -reuse-spool "--file=%mbox1" 27 mail_start -reuse-spool "--file=%mbox1"
28 mail_test "h" \ 28 mail_test "h" \
29 ">U 1 Bar Fri Dec 28 23:28 16/579 Re: Jabberwocky"\ 29 ">U 1 Bar Fri Dec 28 23:28 16/579 Re: Jabberwocky"\
30 " U 2 Sergey Poznyakoff Sat Jul 13 00:43 44/1645 Simple MIME" 30 " U 2 Sergey Poznyakoff Sat Jul 13 00:43 44/1645 Simple MIME"\
31 " U 3 Sergey Poznyakoff Sat Jul 13 00:43 27/931 Empty MIME Parts"
31 32
32 # Send first message to mbox... 33 # Send first message to mbox...
33 mail_command "mbox 1" 34 mail_command "mbox 1"
34 mail_test "h" \ 35 mail_test "h" \
35 ">M 1 Bar Fri Dec 28 23:28 16/579 Re: Jabberwocky"\ 36 ">M 1 Bar Fri Dec 28 23:28 16/579 Re: Jabberwocky"\
36 " U 2 Sergey Poznyakoff Sat Jul 13 00:43 44/1645 Simple MIME" 37 " U 2 Sergey Poznyakoff Sat Jul 13 00:43 44/1645 Simple MIME"\
38 " U 3 Sergey Poznyakoff Sat Jul 13 00:43 27/931 Empty MIME Parts"
37 39
38 # ... and quit 40 # ... and quit
39 mail_test -noprompt "quit" \ 41 mail_test -noprompt "quit" \
40 "Saved 1 message in $MU_SPOOL_DIR/mbox" \ 42 "Saved 1 message in $MU_SPOOL_DIR/mbox" \
41 "Held 1 message in $MU_SPOOL_DIR/mbox1" 43 "Held 2 messages in $MU_SPOOL_DIR/mbox1"
42 44
43 # Now check the mbox contents 45 # Now check the mbox contents
44 mail_start -reuse-spool "--file=%mbox" 46 mail_start -reuse-spool "--file=%mbox"
......
...@@ -21,9 +21,9 @@ Message: 1 ...@@ -21,9 +21,9 @@ Message: 1
21 From: Foo Bar <foobar@nonexistent.net> 21 From: Foo Bar <foobar@nonexistent.net>
22 Subject: Jabberwocky 22 Subject: Jabberwocky
23 Number of parts in message - 1 23 Number of parts in message - 1
24 Total message size - 1255 24 Total message size - 1255/44
25 Type of part 1 = 25 Type of part 1 =
26 Message part size - 1255 26 Message part size - 1255/44
27 Text Message 27 Text Message
28 Begin 28 Begin
29 `Twas brillig, and the slithy toves 29 `Twas brillig, and the slithy toves
...@@ -67,9 +67,9 @@ Message: 2 ...@@ -67,9 +67,9 @@ Message: 2
67 From: Bar <bar@dontmailme.org> 67 From: Bar <bar@dontmailme.org>
68 Subject: Re: Jabberwocky 68 Subject: Re: Jabberwocky
69 Number of parts in message - 1 69 Number of parts in message - 1
70 Total message size - 535 70 Total message size - 535/13
71 Type of part 1 = 71 Type of part 1 =
72 Message part size - 535 72 Message part size - 535/13
73 Text Message 73 Text Message
74 Begin 74 Begin
75 It seems very pretty, but it's *rather* hard to understand!' 75 It seems very pretty, but it's *rather* hard to understand!'
...@@ -82,9 +82,9 @@ Message: 3 ...@@ -82,9 +82,9 @@ Message: 3
82 From: Sergey Poznyakoff <gray@Mirddin.farlep.net> 82 From: Sergey Poznyakoff <gray@Mirddin.farlep.net>
83 Subject: Simple MIME 83 Subject: Simple MIME
84 Number of parts in message - 2 84 Number of parts in message - 2
85 Total message size - 1626 85 Total message size - 1626/42
86 Type of part 1 = text/plain; name="msg.1"; charset="us-ascii" 86 Type of part 1 = text/plain; name="msg.1"; charset="us-ascii"
87 Message part size - 372 87 Message part size - 372/14
88 Text Message 88 Text Message
89 Begin 89 Begin
90 How doth the little crocodile 90 How doth the little crocodile
...@@ -100,7 +100,7 @@ With gently smiling jaws! ...@@ -100,7 +100,7 @@ With gently smiling jaws!
100 100
101 End 101 End
102 Type of part 2 = application/octet-stream; name="msg.21" 102 Type of part 2 = application/octet-stream; name="msg.21"
103 Message part size - 646 103 Message part size - 646/12
104 Attachment - saving [msg.21] 104 Attachment - saving [msg.21]
105 Begin 105 Begin
106 `You are old, Father William,' the young man said, 106 `You are old, Father William,' the young man said,
...@@ -119,9 +119,9 @@ Message: 4 ...@@ -119,9 +119,9 @@ Message: 4
119 From: Sergey Poznyakoff <gray@Mirddin.farlep.net> 119 From: Sergey Poznyakoff <gray@Mirddin.farlep.net>
120 Subject: Nested MIME 120 Subject: Nested MIME
121 Number of parts in message - 2 121 Number of parts in message - 2
122 Total message size - 3484 122 Total message size - 3484/84
123 Type of part 1 = text/plain; name="msg.21"; charset="us-ascii" 123 Type of part 1 = text/plain; name="msg.21"; charset="us-ascii"
124 Message part size - 497 124 Message part size - 497/15
125 Text Message 125 Text Message
126 Begin 126 Begin
127 `You are old, Father William,' the young man said, 127 `You are old, Father William,' the young man said,
...@@ -138,11 +138,11 @@ Why, I do it again and again.' ...@@ -138,11 +138,11 @@ Why, I do it again and again.'
138 138
139 End 139 End
140 Type of part 2 = multipart/mixed; boundary="----- =_aaaaaaaaaa1" 140 Type of part 2 = multipart/mixed; boundary="----- =_aaaaaaaaaa1"
141 Message part size - 2379 141 Message part size - 2379/53
142 Encapsulated message : 142 Encapsulated message :
143 Begin 143 Begin
144 Type of part 1 = application/octet-stream; name="msg.22" 144 Type of part 1 = application/octet-stream; name="msg.22"
145 Message part size - 664 145 Message part size - 664/13
146 Attachment - saving [msg.22] 146 Attachment - saving [msg.22]
147 Begin 147 Begin
148 `You are old,' said the youth, `as I mentioned before, 148 `You are old,' said the youth, `as I mentioned before,
...@@ -157,11 +157,11 @@ Allow me to sell you a couple?' ...@@ -157,11 +157,11 @@ Allow me to sell you a couple?'
157 157
158 End 158 End
159 Type of part 2 = multipart/mixed; boundary="----- =_aaaaaaaaaa2" 159 Type of part 2 = multipart/mixed; boundary="----- =_aaaaaaaaaa2"
160 Message part size - 1532 160 Message part size - 1532/33
161 Encapsulated message : 161 Encapsulated message :
162 Begin 162 Begin
163 Type of part 1 = application/octet-stream; name="msg.23" 163 Type of part 1 = application/octet-stream; name="msg.23"
164 Message part size - 669 164 Message part size - 669/13
165 Attachment - saving [msg.23] 165 Attachment - saving [msg.23]
166 Begin 166 Begin
167 `You are old,' said the youth, `and your jaws are too weak 167 `You are old,' said the youth, `and your jaws are too weak
...@@ -176,7 +176,7 @@ Has lasted the rest of my life.' ...@@ -176,7 +176,7 @@ Has lasted the rest of my life.'
176 176
177 End 177 End
178 Type of part 2 = application/octet-stream; name="msg.24" 178 Type of part 2 = application/octet-stream; name="msg.24"
179 Message part size - 680 179 Message part size - 680/13
180 Attachment - saving [msg.24] 180 Attachment - saving [msg.24]
181 Begin 181 Begin
182 `You are old,' said the youth, `one would hardly suppose 182 `You are old,' said the youth, `one would hardly suppose
...@@ -194,3 +194,21 @@ End ...@@ -194,3 +194,21 @@ End
194 End 194 End
195 195
196 End 196 End
197 Message: 5
198 From: Sergey Poznyakoff <gray@Mirddin.farlep.net>
199 Subject: Empty MIME Parts
200 Number of parts in message - 2
201 Total message size - 912/25
202 Type of part 1 = text/plain; name="empty"; charset="us-ascii
203 Message part size - 143/4
204 Text Message
205 Begin
206
207 End
208 Type of part 2 = text/plain; name="single.line"; charset="us-ascii
209 Message part size - 156/5
210 Text Message
211 Begin
212
213
214 End
......
...@@ -25,9 +25,9 @@ set env(FOLDER) $env(MAIL) ...@@ -25,9 +25,9 @@ set env(FOLDER) $env(MAIL)
25 mu_prepare_spools 25 mu_prepare_spools
26 26
27 mu_exec -message "messages" \ 27 mu_exec -message "messages" \
28 "Number of messages in $MU_SPOOL_DIR/mbox1: 4" 28 "Number of messages in $MU_SPOOL_DIR/mbox1: 5"
29 29
30 mu_exec -message "messages -q" -arg -q "4" 30 mu_exec -message "messages -q" -arg -q "5"
31 31
32 mu_exec -message "messages %teaparty.mbox" -arg %teaparty.mbox \ 32 mu_exec -message "messages %teaparty.mbox" -arg %teaparty.mbox \
33 "Number of messages in $MU_SPOOL_DIR/teaparty.mbox: 95" 33 "Number of messages in $MU_SPOOL_DIR/teaparty.mbox: 95"
......
...@@ -188,8 +188,27 @@ mu_exec -message "readmsg *" -arg "\\\\*" \ ...@@ -188,8 +188,27 @@ mu_exec -message "readmsg *" -arg "\\\\*" \
188 ""\ 188 ""\
189 -- "------- =_aaaaaaaaaa0--"\ 189 -- "------- =_aaaaaaaaaa0--"\
190 ""\ 190 ""\
191 "To: Foo Bar <foobar@nonexistent.net>"\
192 "Subject: Empty MIME Parts"\
193 "Date: Sat, 13 Jul 2002 00:43:18 +0300"\
194 "From: Sergey Poznyakoff <gray@Mirddin.farlep.net>"\
195 ""\
196 -- "------- =_aaaaaaaaaa0"\
197 "Content-Type: text/plain; name=\"empty\"; charset=\"us-ascii\""\
198 "Content-ID: <5082.1026510189.1@Mirddin.farlep.net>"\
199 "Content-Description: Empty part"\
200 ""\
201 -- "------- =_aaaaaaaaaa0"\
202 "Content-Type: text/plain; name=\"single.line\"; charset=\"us-ascii\""\
203 "Content-ID: <5082.1026510189.2@Mirddin.farlep.net>"\
204 "Content-Description: Single line part"\
205 ""\
206 ""\
207 -- "------- =_aaaaaaaaaa0--"\
208 ""\
191 "" 209 ""
192 210
211
193 mu_exec -message "readmsg 1 2" -arg 1 -arg 2 \ 212 mu_exec -message "readmsg 1 2" -arg 1 -arg 2 \
194 "Date: Fri, 28 Dec 2001 22:18:08 +0200"\ 213 "Date: Fri, 28 Dec 2001 22:18:08 +0200"\
195 "From: Foo Bar <foobar@nonexistent.net>"\ 214 "From: Foo Bar <foobar@nonexistent.net>"\
......
...@@ -35,6 +35,7 @@ sieve_test -f "$MU_SPOOL_DIR/mbox1" header-mime.sv -pattern \ ...@@ -35,6 +35,7 @@ sieve_test -f "$MU_SPOOL_DIR/mbox1" header-mime.sv -pattern \
35 "IMPLICIT KEEP on msg uid 1"\ 35 "IMPLICIT KEEP on msg uid 1"\
36 "IMPLICIT KEEP on msg uid 2"\ 36 "IMPLICIT KEEP on msg uid 2"\
37 "DISCARD on msg uid 3: marking as deleted"\ 37 "DISCARD on msg uid 3: marking as deleted"\
38 "IMPLICIT KEEP on msg uid 4" 38 "IMPLICIT KEEP on msg uid 4"\
39 "IMPLICIT KEEP on msg uid 5"
39 40
40 # end of header.exp 41 # end of header.exp
......