Added to the repository
Showing
3 changed files
with
245 additions
and
0 deletions
imap4d/testsuite/imap4d/append.exp
0 → 100644
1 | # -*- tcl -*- | ||
2 | # This file is part of Mailutils testsuite. | ||
3 | # Copyright (C) 2002, Free Software Foundation | ||
4 | # | ||
5 | # This program is free software; you can redistribute it and/or modify | ||
6 | # it under the terms of the GNU General Public License as published by | ||
7 | # the Free Software Foundation; either version 2 of the License, or | ||
8 | # (at your option) any later version. | ||
9 | # | ||
10 | # This program is distributed in the hope that it will be useful, | ||
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | # GNU General Public License for more details. | ||
14 | # | ||
15 | # You should have received a copy of the GNU General Public License | ||
16 | # along with this program; if not, write to the Free Software Foundation, | ||
17 | # Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
18 | |||
19 | # 6.3.11. APPEND Command | ||
20 | # Arguments: mailbox name | ||
21 | # OPTIONAL flag parenthesized list | ||
22 | # OPTIONAL date/time string | ||
23 | # message literal | ||
24 | # Responses: no specific responses for this command | ||
25 | # Result: OK - append completed | ||
26 | # NO - append error: can't append to that mailbox, error | ||
27 | # in flags or date/time or message text | ||
28 | # BAD - command unknown or arguments invalid | ||
29 | # | ||
30 | # The APPEND command appends the literal argument as a new message | ||
31 | # to the end of the specified destination mailbox. This argument | ||
32 | # SHOULD be in the format of an [RFC-822] message. | ||
33 | |||
34 | imap4d_start | ||
35 | imap4d_auth "user!passwd" "guessme" | ||
36 | |||
37 | imap4d_test -long "APPEND mbox (\\Seen)"\ | ||
38 | "Date: Mon, 7 Feb 1994 21:52:25 -0800 (PST) | ||
39 | From: Fred Foobar <foobar@Blurdybloop.COM> | ||
40 | Subject: afternoon meeting | ||
41 | To: mooch@owatagu.siam.edu | ||
42 | Message-Id: <B27397-0100000@Blurdybloop.COM> | ||
43 | MIME-Version: 1.0 | ||
44 | Content-Type: TEXT/PLAIN; CHARSET=US-ASCII | ||
45 | |||
46 | Hello Joe, do you think we can meet at 3:30 tomorrow? | ||
47 | |||
48 | " | ||
49 | |||
50 | imap4d_test -long "APPEND mbox 25-Aug-2002 18:00:00 +0200"\ | ||
51 | "Date: Mon, 7 Feb 1994 21:52:25 -0800 (PST) | ||
52 | From: Fred Foobar <foobar@Blurdybloop.COM> | ||
53 | Subject: afternoon meeting again | ||
54 | To: mooch@owatagu.siam.edu | ||
55 | Message-Id: <B27397-0200000@Blurdybloop.COM> | ||
56 | MIME-Version: 1.0 | ||
57 | Content-Type: TEXT/PLAIN; CHARSET=US-ASCII | ||
58 | |||
59 | Better yet at 04:00? | ||
60 | |||
61 | " | ||
62 | |||
63 | imap4d_test "SELECT mbox"\ | ||
64 | "3 EXISTS"\ | ||
65 | "3 RECENT"\ | ||
66 | -re {OK \[UIDVALIDITY [0-9]+\] UID valididy status}\ | ||
67 | "OK \[UIDNEXT 4\] Predicted next uid"\ | ||
68 | "OK \[UNSEEN 1\] first unseen messsage"\ | ||
69 | "FLAGS (\\Answered \\Flagged \\Deleted \\Seen \\Draft)"\ | ||
70 | "OK \[PERMANENTFLAGS (\\Answered \\Deleted \\Seen)\] Permanent flags"\ | ||
71 | "OK" | ||
72 | |||
73 | imap4d_test "FETCH 2:3 BODY\[\]"\ | ||
74 | "2 FETCH (FLAGS (\\Seen) BODY\[\] {310}"\ | ||
75 | -literal\ | ||
76 | "Date: Mon, 7 Feb 1994 21:52:25 -0800 (PST)"\ | ||
77 | "From: Fred Foobar <foobar@Blurdybloop.COM>"\ | ||
78 | "Subject: afternoon meeting"\ | ||
79 | "To: mooch@owatagu.siam.edu"\ | ||
80 | "Message-Id: <B27397-0100000@Blurdybloop.COM>"\ | ||
81 | "MIME-Version: 1.0"\ | ||
82 | "Content-Type: TEXT/PLAIN; CHARSET=US-ASCII"\ | ||
83 | ""\ | ||
84 | "Hello Joe, do you think we can meet at 3:30 tomorrow?"\ | ||
85 | ")"\ | ||
86 | -noliteral\ | ||
87 | "3 FETCH (FLAGS (\\Seen) BODY\[\] {283}"\ | ||
88 | -literal\ | ||
89 | "Date: Mon, 7 Feb 1994 21:52:25 -0800 (PST)"\ | ||
90 | "From: Fred Foobar <foobar@Blurdybloop.COM>"\ | ||
91 | "Subject: afternoon meeting again"\ | ||
92 | "To: mooch@owatagu.siam.edu"\ | ||
93 | "Message-Id: <B27397-0200000@Blurdybloop.COM>"\ | ||
94 | "MIME-Version: 1.0"\ | ||
95 | "Content-Type: TEXT/PLAIN; CHARSET=US-ASCII"\ | ||
96 | ""\ | ||
97 | "Better yet at 04:00?"\ | ||
98 | ")"\ | ||
99 | "OK" | ||
100 | |||
101 | #end of append.exp | ||
102 | |||
103 | |||
104 | |||
105 | |||
106 |
imap4d/testsuite/imap4d/create.exp
0 → 100644
1 | # -*- tcl -*- | ||
2 | # This file is part of Mailutils testsuite. | ||
3 | # Copyright (C) 2002, Free Software Foundation | ||
4 | # | ||
5 | # This program is free software; you can redistribute it and/or modify | ||
6 | # it under the terms of the GNU General Public License as published by | ||
7 | # the Free Software Foundation; either version 2 of the License, or | ||
8 | # (at your option) any later version. | ||
9 | # | ||
10 | # This program is distributed in the hope that it will be useful, | ||
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | # GNU General Public License for more details. | ||
14 | # | ||
15 | # You should have received a copy of the GNU General Public License | ||
16 | # along with this program; if not, write to the Free Software Foundation, | ||
17 | # Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
18 | |||
19 | # 6.3.3. CREATE Command | ||
20 | # Arguments: mailbox name | ||
21 | # Responses: no specific responses for this command | ||
22 | # Result: OK - create completed | ||
23 | # NO - create failure: can't create mailbox with that name | ||
24 | # BAD - command unknown or arguments invalid | ||
25 | # | ||
26 | # The CREATE command creates a mailbox with the given name. An OK | ||
27 | # response is returned only if a new mailbox with that name has been | ||
28 | # created. It is an error to attempt to create INBOX or a mailbox | ||
29 | # with a name that refers to an extant mailbox. Any error in | ||
30 | # creation will return a tagged NO response. | ||
31 | |||
32 | imap4d_start | ||
33 | imap4d_auth "user!passwd" "guessme" | ||
34 | |||
35 | imap4d_test "CREATE flat" | ||
36 | |||
37 | imap4d_test "CREATE en/to/tre" | ||
38 | |||
39 | imap4d_test -long "APPEND en/to/tre 25-Aug-2002 18:00:00 +0200"\ | ||
40 | "Date: Mon, 7 Feb 1994 21:52:25 -0800 (PST) | ||
41 | From: Fred Foobar <foobar@Blurdybloop.COM> | ||
42 | Subject: afternoon meeting again | ||
43 | To: mooch@owatagu.siam.edu | ||
44 | Message-Id: <B27397-0200000@Blurdybloop.COM> | ||
45 | MIME-Version: 1.0 | ||
46 | Content-Type: TEXT/PLAIN; CHARSET=US-ASCII | ||
47 | |||
48 | Better yet at 04:00? | ||
49 | |||
50 | " | ||
51 | |||
52 | # If the server's hierarchy separator character appears elsewhere in | ||
53 | # the name, the server SHOULD create any superior hierarchical names | ||
54 | # that are needed for the CREATE command to complete successfully. | ||
55 | |||
56 | imap4d_test "SELECT en/to/tre"\ | ||
57 | "1 EXISTS"\ | ||
58 | "1 RECENT"\ | ||
59 | -re {OK \[UIDVALIDITY [0-9]+\] UID valididy status}\ | ||
60 | "OK \[UIDNEXT 2\] Predicted next uid"\ | ||
61 | "OK \[UNSEEN 1\] first unseen messsage"\ | ||
62 | "FLAGS (\\Answered \\Flagged \\Deleted \\Seen \\Draft)"\ | ||
63 | "OK \[PERMANENTFLAGS (\\Answered \\Deleted \\Seen)\] Permanent flags"\ | ||
64 | "OK \[READ-WRITE\] SELECT Completed" | ||
65 | |||
66 | imap4d_test "FETCH 1 ALL"\ | ||
67 | "1 FETCH (FLAGS (\\Recent) INTERNALDATE \"25-Aug-2002 16:00:00 +0000\" RFC822.SIZE 283 ENVELOPE (\"Mon, 7 Feb 1994 21:52:25 -0800 (PST)\" \"afternoon meeting again\" ((\"Fred Foobar\" NIL \"foobar\" \"Blurdybloop.COM\")) ((\"Fred Foobar\" NIL \"foobar\" \"Blurdybloop.COM\")) ((\"Fred Foobar\" NIL \"foobar\" \"Blurdybloop.COM\")) ((NIL NIL \"mooch\" \"owatagu.siam.edu\")) ((NIL NIL \"NIL\" NIL)) ((NIL NIL \"NIL\" NIL)) NIL \"<B27397-0200000@Blurdybloop.COM>\"))"\ | ||
68 | "OK" | ||
69 | |||
70 | |||
71 | |||
... | \ No newline at end of file | ... | \ No newline at end of file |
imap4d/testsuite/imap4d/expunge.exp
0 → 100644
1 | # -*- tcl -*- | ||
2 | # This file is part of Mailutils testsuite. | ||
3 | # Copyright (C) 2002, Free Software Foundation | ||
4 | # | ||
5 | # This program is free software; you can redistribute it and/or modify | ||
6 | # it under the terms of the GNU General Public License as published by | ||
7 | # the Free Software Foundation; either version 2 of the License, or | ||
8 | # (at your option) any later version. | ||
9 | # | ||
10 | # This program is distributed in the hope that it will be useful, | ||
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | # GNU General Public License for more details. | ||
14 | # | ||
15 | # You should have received a copy of the GNU General Public License | ||
16 | # along with this program; if not, write to the Free Software Foundation, | ||
17 | # Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
18 | |||
19 | # 6.4.3. EXPUNGE Command | ||
20 | # Arguments: none | ||
21 | # Responses: untagged responses: EXPUNGE | ||
22 | # Result: OK - expunge completed | ||
23 | # NO - expunge failure: can't expunge (e.g. permission | ||
24 | # denied) | ||
25 | # BAD - command unknown or arguments invalid | ||
26 | # | ||
27 | # The EXPUNGE command permanently removes from the currently | ||
28 | # selected mailbox all messages that have the \Deleted flag set. | ||
29 | # Before returning an OK to the client, an untagged EXPUNGE response | ||
30 | # is sent for each message that is removed. | ||
31 | |||
32 | imap4d_start | ||
33 | imap4d_auth "user!passwd" "guessme" | ||
34 | |||
35 | imap4d_test "SELECT mbox1" \ | ||
36 | "4 EXISTS"\ | ||
37 | "4 RECENT"\ | ||
38 | -re {OK \[UIDVALIDITY [0-9]+\] UID valididy status}\ | ||
39 | "OK \[UIDNEXT 5\] Predicted next uid"\ | ||
40 | "OK \[UNSEEN 1\] first unseen messsage"\ | ||
41 | "FLAGS (\\Answered \\Flagged \\Deleted \\Seen \\Draft)"\ | ||
42 | "OK \[PERMANENTFLAGS (\\Answered \\Deleted \\Seen)\] Permanent flags" \ | ||
43 | "OK" | ||
44 | |||
45 | imap4d_test "STORE 2:* +FLAGS (\\Deleted)"\ | ||
46 | "2 FETCH FLAGS (\\Deleted \\Recent)"\ | ||
47 | "3 FETCH FLAGS (\\Deleted \\Recent)"\ | ||
48 | "4 FETCH FLAGS (\\Deleted \\Recent)"\ | ||
49 | "OK" | ||
50 | |||
51 | imap4d_test "EXPUNGE"\ | ||
52 | "2 EXPUNGED"\ | ||
53 | "2 EXPUNGED"\ | ||
54 | "2 EXPUNGED"\ | ||
55 | "1 EXISTS"\ | ||
56 | "1 RECENT"\ | ||
57 | "OK" | ||
58 | |||
59 | imap4d_test "CLOSE" | ||
60 | |||
61 | imap4d_test "SELECT mbox1" \ | ||
62 | "1 EXISTS"\ | ||
63 | -re {OK \[UIDVALIDITY [0-9]+\] UID valididy status}\ | ||
64 | "OK \[UIDNEXT 5\] Predicted next uid"\ | ||
65 | "OK \[UNSEEN 1\] first unseen messsage"\ | ||
66 | "FLAGS (\\Answered \\Flagged \\Deleted \\Seen \\Draft)"\ | ||
67 | "OK \[PERMANENTFLAGS (\\Answered \\Deleted \\Seen)\] Permanent flags" \ | ||
68 | "OK" |
-
Please register or sign in to post a comment