summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac3
-rw-r--r--frm/tests/Makefile.am4
-rw-r--r--imap4d/testsuite/imap4d/fetch.exp36
-rw-r--r--mail/testsuite/mail/read.exp50
-rw-r--r--mail/testsuite/mail/write.exp20
-rw-r--r--mailbox/testsuite/Mime14
-rw-r--r--readmsg/Makefile.am2
-rw-r--r--readmsg/tests/.gitignore7
-rw-r--r--readmsg/tests/Makefile.am66
-rw-r--r--readmsg/tests/all.at205
-rw-r--r--readmsg/tests/atlocal.in7
-rw-r--r--readmsg/tests/hdr.at37
-rw-r--r--readmsg/tests/nohdr.at27
-rw-r--r--readmsg/tests/testsuite.at54
-rw-r--r--readmsg/tests/twomsg.at74
-rw-r--r--readmsg/tests/weed.at30
-rw-r--r--readmsg/testsuite/.gitignore7
-rw-r--r--readmsg/testsuite/Makefile.am89
-rw-r--r--readmsg/testsuite/readmsg/DISTFILES1
-rw-r--r--readmsg/testsuite/readmsg/test.exp309
-rw-r--r--sieve/tests/testsuite.at2
-rw-r--r--sieve/tests/version.at2
-rw-r--r--testsuite/spool/mbox110
-rw-r--r--testsuite/testsuite.inc7
24 files changed, 582 insertions, 481 deletions
diff --git a/configure.ac b/configure.ac
index 8e1de2d5d..c7babe753 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1215,2 +1215,4 @@ AC_CONFIG_FILES([frm/tests/Makefile
frm/tests/atlocal
+ readmsg/tests/Makefile
+ readmsg/tests/atlocal
sieve/tests/Makefile
@@ -1375,3 +1377,2 @@ AC_CONFIG_FILES([
readmsg/Makefile
- readmsg/testsuite/Makefile
mu-aux/Makefile
diff --git a/frm/tests/Makefile.am b/frm/tests/Makefile.am
index a361bbea6..647d10843 100644
--- a/frm/tests/Makefile.am
+++ b/frm/tests/Makefile.am
@@ -40,5 +40,3 @@ $(srcdir)/package.m4: $(top_srcdir)/configure.ac
-TESTSUITE_AT = \
- testsuite.at\
- version.at
+TESTSUITE_AT = testsuite.at
diff --git a/imap4d/testsuite/imap4d/fetch.exp b/imap4d/testsuite/imap4d/fetch.exp
index e61f3b51b..005282f14 100644
--- a/imap4d/testsuite/imap4d/fetch.exp
+++ b/imap4d/testsuite/imap4d/fetch.exp
@@ -80,7 +80,7 @@ imap4d_test "FETCH 1:* ENVELOPE"\
imap4d_test "FETCH 1:\* ALL"\
-"1 FETCH (FLAGS (\\Recent) INTERNALDATE \"28-Dec-2001 22:18:09 +0000\" RFC822.SIZE 1299 ENVELOPE (\"Fri, 28 Dec 2001 22:18:08 +0200\" \"Jabberwocky\" ((\"Foo Bar\" NIL \"foobar\" \"nonexistent.net\")) ((\"Foo Bar\" NIL \"foobar\" \"nonexistent.net\")) ((\"Foo Bar\" NIL \"foobar\" \"nonexistent.net\")) ((\"Bar\" NIL \"bar\" \"dontmailme.org\")) NIL NIL NIL \"<200112282018.fBSKI8N04906@nonexistent.net>\"))"\
-"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>\"))"\
-"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>\"))"\
-"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>\"))"\
-"5 FETCH (FLAGS (\\Recent) INTERNALDATE \"13-Jul-2002 00:43:18 +0000\" RFC822.SIZE 941 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>\"))"\
+"1 FETCH (FLAGS (\\Recent) INTERNALDATE \"28-Dec-2001 22:18:09 +0000\" RFC822.SIZE 1298 ENVELOPE (\"Fri, 28 Dec 2001 22:18:08 +0200\" \"Jabberwocky\" ((\"Foo Bar\" NIL \"foobar\" \"nonexistent.net\")) ((\"Foo Bar\" NIL \"foobar\" \"nonexistent.net\")) ((\"Foo Bar\" NIL \"foobar\" \"nonexistent.net\")) ((\"Bar\" NIL \"bar\" \"dontmailme.org\")) NIL NIL NIL \"<200112282018.fBSKI8N04906@nonexistent.net>\"))"\
+"2 FETCH (FLAGS (\\Recent) INTERNALDATE \"28-Dec-2001 23:28:09 +0000\" RFC822.SIZE 547 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>\"))"\
+"3 FETCH (FLAGS (\\Recent) INTERNALDATE \"13-Jul-2002 00:43:18 +0000\" RFC822.SIZE 1667 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>\"))"\
+"4 FETCH (FLAGS (\\Recent) INTERNALDATE \"13-Jul-2002 00:50:58 +0000\" RFC822.SIZE 3567 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>\"))"\
+"5 FETCH (FLAGS (\\Recent) INTERNALDATE \"13-Jul-2002 00:43:18 +0000\" RFC822.SIZE 940 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>\"))"\
"OK"
@@ -126,5 +126,5 @@ imap4d_test "FETCH 1:* BODY"\
imap4d_test "FETCH 1 BODY.PEEK\[HEADER\]"\
-"1 FETCH (BODY\[HEADER\] {327}"\
+"1 FETCH (BODY\[HEADER\] {326}"\
-literal\
-"Received: (from foobar@nonexistent.net) "\
+"Received: (from foobar@nonexistent.net)"\
" by nonexistent.net id fBSKI8N04906"\
@@ -146,5 +146,5 @@ imap4d_test "FETCH 1 BODY.PEEK\[HEADER\]"\
imap4d_test "FETCH 1 BODY\[HEADER\]"\
-"1 FETCH (FLAGS (\\Seen) BODY\[HEADER\] {327}"\
+"1 FETCH (FLAGS (\\Seen) BODY\[HEADER\] {326}"\
-literal\
-"Received: (from foobar@nonexistent.net) "\
+"Received: (from foobar@nonexistent.net)"\
" by nonexistent.net id fBSKI8N04906"\
@@ -181,5 +181,5 @@ imap4d_test "FETCH 1 BODY\[HEADER.FIELDS (FROM TO SUBJECT)\]"\
imap4d_test "FETCH 1 BODY\[HEADER.FIELDS.NOT (FROM TO SUBJECT)\]"\
-"1 FETCH (BODY\[HEADER.FIELDS.NOT (FROM TO SUBJECT)\] {235}"\
+"1 FETCH (BODY\[HEADER.FIELDS.NOT (FROM TO SUBJECT)\] {234}"\
-literal\
-"Received: (from foobar@nonexistent.net) "\
+"Received: (from foobar@nonexistent.net)"\
" by nonexistent.net id fBSKI8N04906"\
@@ -421,5 +421,5 @@ imap4d_test "STORE 1:* -FLAGS (\\Seen)"\
imap4d_test "FETCH 1 RFC822"\
-"1 FETCH (FLAGS (\\Seen) RFC822 {1299}"\
+"1 FETCH (FLAGS (\\Seen) RFC822 {1298}"\
-literal\
-"Received: (from foobar@nonexistent.net) "\
+"Received: (from foobar@nonexistent.net)"\
" by nonexistent.net id fBSKI8N04906"\
@@ -475,5 +475,5 @@ imap4d_test "FETCH 1 RFC822"\
imap4d_test "FETCH 2 RFC822.HEADER"\
-"2 FETCH (RFC822.HEADER {329}"\
+"2 FETCH (RFC822.HEADER {328}"\
-literal\
-"Received: (from bar@dontmailme.org) "\
+"Received: (from bar@dontmailme.org)"\
" by dontmailme.org id fERKR9N16790"\
@@ -492,3 +492,3 @@ imap4d_test "FETCH 2 RFC822.HEADER"\
imap4d_test "FETCH 3 RFC822.SIZE"\
-"3 FETCH (RFC822.SIZE 1668)"\
+"3 FETCH (RFC822.SIZE 1667)"\
"OK"
@@ -512,3 +512,3 @@ imap4d_test "FETCH 2 RFC822.TEXT"\
imap4d_test "FETCH 1 FAST" \
-"1 FETCH (FLAGS (\\Seen \\Recent) INTERNALDATE \"28-Dec-2001 22:18:09 +0000\" RFC822.SIZE 1299)"\
+"1 FETCH (FLAGS (\\Seen \\Recent) INTERNALDATE \"28-Dec-2001 22:18:09 +0000\" RFC822.SIZE 1298)"\
"OK"
@@ -519,3 +519,3 @@ imap4d_test "FETCH 1 FAST" \
imap4d_test "FETCH 4 FULL"\
-"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>\") BODY ((\"text\" \"plain\" (\"name\" \"msg.21\" \"charset\" \"us-ascii\") \"<5122.1026510654.2@Mirddin.farlep.net>\" \"Father William Part I\" \"7BIT\" 351 10)((\"application\" \"octet-stream\" (\"name\" \"msg.22\") \"<5122.1026510654.4@Mirddin.farlep.net>\" \"Father William Part II\" \"base64\" 486)((\"application\" \"octet-stream\" (\"name\" \"msg.23\") \"<5122.1026510654.6@Mirddin.farlep.net>\" \"Father William Part III\" \"base64\" 490)(\"application\" \"octet-stream\" (\"name\" \"msg.24\") \"<5122.1026510654.7@Mirddin.farlep.net>\" \"Father William Part IV\" \"base64\" 502) \"mixed\" NIL NIL NIL) \"mixed\" NIL NIL NIL) \"mixed\" NIL NIL NIL))"\
+"4 FETCH (FLAGS (\\Recent) INTERNALDATE \"13-Jul-2002 00:50:58 +0000\" RFC822.SIZE 3567 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>\") BODY ((\"text\" \"plain\" (\"name\" \"msg.21\" \"charset\" \"us-ascii\") \"<5122.1026510654.2@Mirddin.farlep.net>\" \"Father William Part I\" \"7BIT\" 351 10)((\"application\" \"octet-stream\" (\"name\" \"msg.22\") \"<5122.1026510654.4@Mirddin.farlep.net>\" \"Father William Part II\" \"base64\" 486)((\"application\" \"octet-stream\" (\"name\" \"msg.23\") \"<5122.1026510654.6@Mirddin.farlep.net>\" \"Father William Part III\" \"base64\" 490)(\"application\" \"octet-stream\" (\"name\" \"msg.24\") \"<5122.1026510654.7@Mirddin.farlep.net>\" \"Father William Part IV\" \"base64\" 502) \"mixed\" NIL NIL NIL) \"mixed\" NIL NIL NIL) \"mixed\" NIL NIL NIL))"\
"OK"
diff --git a/mail/testsuite/mail/read.exp b/mail/testsuite/mail/read.exp
index 5d6d9ac62..fbb52aec4 100644
--- a/mail/testsuite/mail/read.exp
+++ b/mail/testsuite/mail/read.exp
@@ -29,6 +29,6 @@ mail_command "set readonly"
mail_test "size *" \
-"> 1 44/1255 "\
-" 2 13/535 "\
-" 3 42/1626 "\
-" 4 84/3484 "
+"> 1 44/1254 "\
+" 2 13/534 "\
+" 3 42/1625 "\
+" 4 84/3483 "
@@ -37,9 +37,9 @@ mail_test "size *" \
mail_test "headers" \
-">N 1 Foo Bar Fri Dec 28 22:18 44/1255 Jabberwocky" \
-" N 2 Bar Fri Dec 28 23:28 13/535 Re: Jabberwocky" \
-" N 3 Sergey Poznyakoff Sat Jul 13 00:43 42/1626 Simple MIME" \
-" N 4 Sergey Poznyakoff Sat Jul 13 00:50 84/3484 Nested MIME" \
+">N 1 Foo Bar Fri Dec 28 22:18 44/1254 Jabberwocky" \
+" N 2 Bar Fri Dec 28 23:28 13/534 Re: Jabberwocky" \
+" N 3 Sergey Poznyakoff Sat Jul 13 00:43 42/1625 Simple MIME" \
+" N 4 Sergey Poznyakoff Sat Jul 13 00:50 84/3483 Nested MIME" \
mail_test "print"\
- "Received: (from foobar@nonexistent.net) "\
+ "Received: (from foobar@nonexistent.net)"\
" by nonexistent.net id fBSKI8N04906"\
@@ -89,3 +89,3 @@ mail_test "print"\
mail_test "Print"\
- "Received: (from foobar@nonexistent.net) "\
+ "Received: (from foobar@nonexistent.net)"\
" by nonexistent.net id fBSKI8N04906"\
@@ -137,3 +137,3 @@ mail_test "Print"\
mail_test "top" \
- "Received: (from foobar@nonexistent.net) "\
+ "Received: (from foobar@nonexistent.net)"\
" by nonexistent.net id fBSKI8N04906"\
@@ -160,6 +160,6 @@ mail_test -message "top (2)" "top" \
mail_test -message "headers (2)" "headers" \
-">R 1 Foo Bar Fri Dec 28 22:18 44/1255 Jabberwocky" \
-" N 2 Bar Fri Dec 28 23:28 13/535 Re: Jabberwocky" \
-" N 3 Sergey Poznyakoff Sat Jul 13 00:43 42/1626 Simple MIME" \
-" N 4 Sergey Poznyakoff Sat Jul 13 00:50 84/3484 Nested MIME" \
+">R 1 Foo Bar Fri Dec 28 22:18 44/1254 Jabberwocky" \
+" N 2 Bar Fri Dec 28 23:28 13/534 Re: Jabberwocky" \
+" N 3 Sergey Poznyakoff Sat Jul 13 00:43 42/1625 Simple MIME" \
+" N 4 Sergey Poznyakoff Sat Jul 13 00:50 84/3483 Nested MIME" \
@@ -169,3 +169,3 @@ mail_test -message "headers (2)" "headers" \
mail_test "next" \
-"Received: (from bar@dontmailme.org) "\
+"Received: (from bar@dontmailme.org)"\
" by dontmailme.org id fERKR9N16790"\
@@ -187,6 +187,6 @@ mail_test "next" \
mail_test -message "headers (3)" "headers" \
-" R 1 Foo Bar Fri Dec 28 22:18 44/1255 Jabberwocky" \
-">R 2 Bar Fri Dec 28 23:28 13/535 Re: Jabberwocky" \
-" N 3 Sergey Poznyakoff Sat Jul 13 00:43 42/1626 Simple MIME" \
-" N 4 Sergey Poznyakoff Sat Jul 13 00:50 84/3484 Nested MIME" \
+" R 1 Foo Bar Fri Dec 28 22:18 44/1254 Jabberwocky" \
+">R 2 Bar Fri Dec 28 23:28 13/534 Re: Jabberwocky" \
+" N 3 Sergey Poznyakoff Sat Jul 13 00:43 42/1625 Simple MIME" \
+" N 4 Sergey Poznyakoff Sat Jul 13 00:50 84/3483 Nested MIME" \
@@ -214,6 +214,6 @@ mail_test "prev"\
mail_test -message "headers (4)" "headers" \
-">R 1 Foo Bar Fri Dec 28 22:18 44/1255 Jabberwocky" \
-" R 2 Bar Fri Dec 28 23:28 13/535 Re: Jabberwocky" \
-" N 3 Sergey Poznyakoff Sat Jul 13 00:43 42/1626 Simple MIME" \
-" N 4 Sergey Poznyakoff Sat Jul 13 00:50 84/3484 Nested MIME" \
+">R 1 Foo Bar Fri Dec 28 22:18 44/1254 Jabberwocky" \
+" R 2 Bar Fri Dec 28 23:28 13/534 Re: Jabberwocky" \
+" N 3 Sergey Poznyakoff Sat Jul 13 00:43 42/1625 Simple MIME" \
+" N 4 Sergey Poznyakoff Sat Jul 13 00:50 84/3483 Nested MIME" \
@@ -223,3 +223,3 @@ mail_test -message "headers (4)" "headers" \
mail_test -message "print (2)" "print 2"\
-"Received: (from bar@dontmailme.org) "\
+"Received: (from bar@dontmailme.org)"\
" by dontmailme.org id fERKR9N16790"\
diff --git a/mail/testsuite/mail/write.exp b/mail/testsuite/mail/write.exp
index 4f3ebf48b..d2cce6ffa 100644
--- a/mail/testsuite/mail/write.exp
+++ b/mail/testsuite/mail/write.exp
@@ -44,5 +44,5 @@ mail_start -reuse-spool "--file=%mbox1"
mail_test "h" \
- ">U 1 Bar Fri Dec 28 23:28 16/579 Re: Jabberwocky"\
- " U 2 Sergey Poznyakoff Sat Jul 13 00:43 44/1645 Simple MIME"\
- " U 3 Sergey Poznyakoff Sat Jul 13 00:43 29/933 Empty MIME Parts"
+ ">U 1 Bar Fri Dec 28 23:28 16/578 Re: Jabberwocky"\
+ " U 2 Sergey Poznyakoff Sat Jul 13 00:43 44/1644 Simple MIME"\
+ " U 3 Sergey Poznyakoff Sat Jul 13 00:43 29/932 Empty MIME Parts"
@@ -51,5 +51,5 @@ mail_command "mbox 1"
mail_test "h" \
- ">M 1 Bar Fri Dec 28 23:28 16/579 Re: Jabberwocky"\
- " U 2 Sergey Poznyakoff Sat Jul 13 00:43 44/1645 Simple MIME"\
- " U 3 Sergey Poznyakoff Sat Jul 13 00:43 29/933 Empty MIME Parts"
+ ">M 1 Bar Fri Dec 28 23:28 16/578 Re: Jabberwocky"\
+ " U 2 Sergey Poznyakoff Sat Jul 13 00:43 44/1644 Simple MIME"\
+ " U 3 Sergey Poznyakoff Sat Jul 13 00:43 29/932 Empty MIME Parts"
@@ -64,3 +64,3 @@ mail_test "headers" \
">N 1 Sergey Poznyakoff Tue Jul 16 12:11 12/425 MBOX"\
- " U 2 Bar Fri Dec 28 23:28 16/579 Re: Jabberwocky"
+ " U 2 Bar Fri Dec 28 23:28 16/578 Re: Jabberwocky"
@@ -69,3 +69,3 @@ mail_command "set folder=\"$MU_FOLDER_DIR\""
mail_test "save 1 2 +three" \
- "\"$MU_FOLDER_DIR/three\" 28/1004"
+ "\"$MU_FOLDER_DIR/three\" 28/1003"
@@ -73,3 +73,3 @@ mail_test "headers" \
">* 1 Sergey Poznyakoff Tue Jul 16 12:11 12/425 MBOX"\
- " * 2 Bar Fri Dec 28 23:28 16/579 Re: Jabberwocky"
+ " * 2 Bar Fri Dec 28 23:28 16/578 Re: Jabberwocky"
@@ -82,3 +82,3 @@ mail_test "headers" \
">N 1 Sergey Poznyakoff Tue Jul 16 12:11 12/425 MBOX"\
- " U 2 Bar Fri Dec 28 23:28 16/579 Re: Jabberwocky"
+ " U 2 Bar Fri Dec 28 23:28 16/578 Re: Jabberwocky"
diff --git a/mailbox/testsuite/Mime b/mailbox/testsuite/Mime
index 39cb23834..147c16ea4 100644
--- a/mailbox/testsuite/Mime
+++ b/mailbox/testsuite/Mime
@@ -23,5 +23,5 @@ Subject: Jabberwocky
Number of parts in message - 1
-Total message size - 1255/44
+Total message size - 1254/44
Type of part 1 =
-Message part size - 1255/44: 318/9, 937/35
+Message part size - 1254/44: 317/9, 937/35
Text Message
@@ -69,5 +69,5 @@ Subject: Re: Jabberwocky
Number of parts in message - 1
-Total message size - 535/13
+Total message size - 534/13
Type of part 1 =
-Message part size - 535/13: 320/9, 215/4
+Message part size - 534/13: 319/9, 215/4
Text Message
@@ -84,3 +84,3 @@ Subject: Simple MIME
Number of parts in message - 2
-Total message size - 1626/42
+Total message size - 1625/42
Type of part 1 = text/plain
@@ -120,3 +120,3 @@ Subject: Nested MIME
Number of parts in message - 2
-Total message size - 3484/84
+Total message size - 3483/84
Type of part 1 = text/plain
@@ -198,3 +198,3 @@ Subject: Empty MIME Parts
Number of parts in message - 2
-Total message size - 914/27
+Total message size - 913/27
Type of part 1 = text/plain
diff --git a/readmsg/Makefile.am b/readmsg/Makefile.am
index d22141fdd..844b1fe17 100644
--- a/readmsg/Makefile.am
+++ b/readmsg/Makefile.am
@@ -22,3 +22,3 @@ INCLUDES = @MU_APP_COMMON_INCLUDES@
-SUBDIRS = testsuite
+SUBDIRS = tests
diff --git a/readmsg/tests/.gitignore b/readmsg/tests/.gitignore
new file mode 100644
index 000000000..33e4e9a57
--- /dev/null
+++ b/readmsg/tests/.gitignore
@@ -0,0 +1,7 @@
+atconfig
+atlocal
+package.m4
+status.mf
+testsuite
+testsuite.dir
+testsuite.log
diff --git a/readmsg/tests/Makefile.am b/readmsg/tests/Makefile.am
new file mode 100644
index 000000000..69c08a9ae
--- /dev/null
+++ b/readmsg/tests/Makefile.am
@@ -0,0 +1,66 @@
+# This file is part of GNU Mailutils.
+# Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+#
+# GNU Mailutils is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 3, or (at
+# your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Mailutils. If not, see <http://www.gnu.org/licenses/>.
+
+EXTRA_DIST = $(TESTSUITE_AT) testsuite package.m4
+DISTCLEANFILES = atconfig $(check_SCRIPTS)
+MAINTAINERCLEANFILES = Makefile.in $(TESTSUITE)
+
+## ------------ ##
+## package.m4. ##
+## ------------ ##
+
+$(srcdir)/package.m4: $(top_srcdir)/configure.ac
+ { \
+ echo '# Signature of the current package.'; \
+ echo 'm4_define([AT_PACKAGE_NAME], [@PACKAGE_NAME@])'; \
+ echo 'm4_define([AT_PACKAGE_TARNAME], [@PACKAGE_TARNAME@])'; \
+ echo 'm4_define([AT_PACKAGE_VERSION], [@PACKAGE_VERSION@])'; \
+ echo 'm4_define([AT_PACKAGE_STRING], [@PACKAGE_STRING@])'; \
+ echo 'm4_define([AT_PACKAGE_BUGREPORT], [@PACKAGE_BUGREPORT@])'; \
+ } >$(srcdir)/package.m4
+
+#
+
+## ------------ ##
+## Test suite. ##
+## ------------ ##
+
+TESTSUITE_AT = \
+ all.at\
+ testsuite.at
+
+TESTSUITE = $(srcdir)/testsuite
+M4=m4
+
+AUTOTEST = $(AUTOM4TE) --language=autotest
+$(TESTSUITE): package.m4 $(TESTSUITE_AT)
+ $(AM_V_GEN)$(AUTOTEST) -I $(srcdir) -I $(top_srcdir)/testsuite testsuite.at -o $@.tmp
+ $(AM_V_at)mv $@.tmp $@
+
+atconfig: $(top_builddir)/config.status
+ cd $(top_builddir) && ./config.status tests/$@
+
+clean-local:
+ @test ! -f $(TESTSUITE) || $(SHELL) $(TESTSUITE) --clean
+
+check-local: atconfig atlocal $(TESTSUITE)
+ @$(SHELL) $(TESTSUITE)
+
+# Run the test suite on the *installed* tree.
+#installcheck-local:
+# $(SHELL) $(TESTSUITE) AUTOTEST_PATH=$(exec_prefix)/bin
+
+
diff --git a/readmsg/tests/all.at b/readmsg/tests/all.at
new file mode 100644
index 000000000..741d37d68
--- /dev/null
+++ b/readmsg/tests/all.at
@@ -0,0 +1,205 @@
+# This file is part of GNU Mailutils. -*- Autotest -*-
+# Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+#
+# GNU Mailutils is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 3, or (at
+# your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Mailutils. If not, see <http://www.gnu.org/licenses/>.
+# This file is part of Mailfromd testsuite.
+
+READMSGTEST([readmsg *],[readmsg00],
+['*'],
+[0],
+[Date: Fri, 28 Dec 2001 22:18:08 +0200
+From: Foo Bar <foobar@nonexistent.net>
+To: Bar <bar@dontmailme.org>
+Subject: Jabberwocky
+
+`Twas brillig, and the slithy toves
+Did gyre and gimble in the wabe;
+All mimsy were the borogoves,
+And the mome raths outgrabe.
+
+`Beware the Jabberwock, my son!
+The jaws that bite, the claws that catch!
+Beware the Jujub bird, and shun
+The frumious Bandersnatch!'
+
+He took his vorpal sword in hand:
+Long time the manxome foe he sought --
+So rested he by the Tumtum gree,
+And stood awhile in thought.
+
+And as in uffish thought he stood,
+The Jabberwock, with eyes of flame,
+Came whiffling through the tulgey wook,
+And burbled as it came!
+
+One, two! One, two! And through and through
+The vorpal blade went snicker-snack!
+He left it dead, and with its head
+He went galumphing back.
+
+`And has thou slain the Jabberwock?
+Come to my arms, my beamish boy!
+O frabjous day! Calloh! Callay!
+He chortled in his joy.
+
+`Twas brillig, and the slithy toves
+Did gyre and gimble in the wabe;
+All mimsy were the borogoves,
+And the mome raths outgrabe.
+
+
+Date: Fri, 28 Dec 2001 23:28:08 +0200
+From: Bar <bar@dontmailme.org>
+To: Foo Bar <foobar@nonexistent.net>
+Subject: Re: Jabberwocky
+
+It seems very pretty, but it's *rather* hard to understand!'
+Somehow it seems to fill my head with ideas -- only I don't
+exactly know what they are! However, SOMEBODY killed SOMETHING:
+that's clear, at any rate...
+
+To: Foo Bar <foobar@nonexistent.net>
+Subject: Simple MIME
+Date: Sat, 13 Jul 2002 00:43:18 +0300
+From: Sergey Poznyakoff <gray@Mirddin.farlep.net>
+
+------- =_aaaaaaaaaa0
+Content-Type: text/plain; name="msg.1"; charset="us-ascii"
+Content-ID: <5082.1026510189.1@Mirddin.farlep.net>
+Content-Description: How doth
+
+How doth the little crocodile
+Improve his shining tail,
+And pour the waters of the Nile
+On every golden scale!
+
+`How cheerfully he seems to grin,
+How neatly spread his claws,
+And welcome little fishes in
+With gently smiling jaws!
+
+------- =_aaaaaaaaaa0
+Content-Type: application/octet-stream; name="msg.21"
+Content-ID: <5082.1026510189.2@Mirddin.farlep.net>
+Content-Description: Father William Part I
+Content-Transfer-Encoding: base64
+
+YFlvdSBhcmUgb2xkLCBGYXRoZXIgV2lsbGlhbSwnIHRoZSB5b3VuZyBtYW4gc2FpZCwKYEFuZCB5
+b3VyIGhhaXIgaGFzIGJlY29tZSB2ZXJ5IHdoaXRlOwpBbmQgeWV0IHlvdSBpbmNlc3NhbnRseSBz
+dGFuZCBvbiB5b3VyIGhlYWQtLQpEbyB5b3UgdGhpbmssIGF0IHlvdXIgYWdlLCBpdCBpcyByaWdo
+dD8nCgpgSW4gbXkgeW91dGgsJyBGYXRoZXIgV2lsbGlhbSByZXBsaWVkIHRvIGhpcyBzb24sCmBJ
+IGZlYXJlZCBpdCBtaWdodCBpbmp1cmUgdGhlIGJyYWluOwpCdXQsIG5vdyB0aGF0IEknbSBwZXJm
+ZWN0bHkgc3VyZSBJIGhhdmUgbm9uZSwKV2h5LCBJIGRvIGl0IGFnYWluIGFuZCBhZ2Fpbi4nCgo=
+
+------- =_aaaaaaaaaa0--
+
+To: Foo Bar <foobar@nonexistent.net>
+Subject: Nested MIME
+Date: Sat, 13 Jul 2002 00:50:58 +0300
+From: Sergey Poznyakoff <gray@Mirddin.farlep.net>
+
+------- =_aaaaaaaaaa0
+Content-Type: text/plain; name="msg.21"; charset="us-ascii"
+Content-ID: <5122.1026510654.2@Mirddin.farlep.net>
+Content-Description: Father William Part I
+
+`You are old, Father William,' the young man said,
+`And your hair has become very white;
+And yet you incessantly stand on your head--
+Do you think, at your age, it is right?'
+
+`In my youth,' Father William replied to his son,
+`I feared it might injure the brain;
+But, now that I'm perfectly sure I have none,
+Why, I do it again and again.'
+
+
+------- =_aaaaaaaaaa0
+Content-Type: multipart/mixed; boundary="----- =_aaaaaaaaaa1"
+Content-ID: <5122.1026510654.3@Mirddin.farlep.net>
+
+------- =_aaaaaaaaaa1
+Content-Type: application/octet-stream; name="msg.22"
+Content-ID: <5122.1026510654.4@Mirddin.farlep.net>
+Content-Description: Father William Part II
+Content-Transfer-Encoding: base64
+
+YFlvdSBhcmUgb2xkLCcgc2FpZCB0aGUgeW91dGgsIGBhcyBJIG1lbnRpb25lZCBiZWZvcmUsCkFu
+ZCBoYXZlIGdyb3duIG1vc3QgdW5jb21tb25seSBmYXQ7CllldCB5b3UgdHVybmVkIGEgYmFjay1z
+b21lcnNhdWx0IGluIGF0IHRoZSBkb29yLS0KUHJheSwgd2hhdCBpcyB0aGUgcmVhc29uIG9mIHRo
+YXQ/JwoKYEluIG15IHlvdXRoLCcgc2FpZCB0aGUgc2FnZSwgYXMgaGUgc2hvb2sgaGlzIGdyZXkg
+bG9ja3MsCmBJIGtlcHQgYWxsIG15IGxpbWJzIHZlcnkgc3VwcGxlCkJ5IHRoZSB1c2Ugb2YgdGhp
+cyBvaW50bWVudC0tb25lIHNoaWxsaW5nIHRoZSBib3gtLQpBbGxvdyBtZSB0byBzZWxsIHlvdSBh
+IGNvdXBsZT8nCg==
+
+------- =_aaaaaaaaaa1
+Content-Type: multipart/mixed; boundary="----- =_aaaaaaaaaa2"
+Content-ID: <5122.1026510654.5@Mirddin.farlep.net>
+
+------- =_aaaaaaaaaa2
+Content-Type: application/octet-stream; name="msg.23"
+Content-ID: <5122.1026510654.6@Mirddin.farlep.net>
+Content-Description: Father William Part III
+Content-Transfer-Encoding: base64
+
+YFlvdSBhcmUgb2xkLCcgc2FpZCB0aGUgeW91dGgsIGBhbmQgeW91ciBqYXdzIGFyZSB0b28gd2Vh
+awpGb3IgYW55dGhpbmcgdG91Z2hlciB0aGFuIHN1ZXQ7CllldCB5b3UgZmluaXNoZWQgdGhlIGdv
+b3NlLCB3aXRoIHRoZSBib25lcyBhbmQgdGhlIGJlYWstLQpQcmF5IGhvdyBkaWQgeW91IG1hbmFn
+ZSB0byBkbyBpdD8nCgpgSW4gbXkgeW91dGgsJyBzYWlkIGhpcyBmYXRoZXIsIGBJIHRvb2sgdG8g
+dGhlIGxhdywKQW5kIGFyZ3VlZCBlYWNoIGNhc2Ugd2l0aCBteSB3aWZlOwpBbmQgdGhlIG11c2N1
+bGFyIHN0cmVuZ3RoLCB3aGljaCBpdCBnYXZlIHRvIG15IGphdywKSGFzIGxhc3RlZCB0aGUgcmVz
+dCBvZiBteSBsaWZlLicK
+
+------- =_aaaaaaaaaa2
+Content-Type: application/octet-stream; name="msg.24"
+Content-ID: <5122.1026510654.7@Mirddin.farlep.net>
+Content-Description: Father William Part IV
+Content-Transfer-Encoding: base64
+
+YFlvdSBhcmUgb2xkLCcgc2FpZCB0aGUgeW91dGgsIGBvbmUgd291bGQgaGFyZGx5IHN1cHBvc2UK
+VGhhdCB5b3VyIGV5ZSB3YXMgYXMgc3RlYWR5IGFzIGV2ZXI7CllldCB5b3UgYmFsYW5jZWQgYW4g
+ZWVsIG9uIHRoZSBlbmQgb2YgeW91ciBub3NlLS0KV2hhdCBtYWRlIHlvdSBzbyBhd2Z1bGx5IGNs
+ZXZlcj8nCgpgSSBoYXZlIGFuc3dlcmVkIHRocmVlIHF1ZXN0aW9ucywgYW5kIHRoYXQgaXMgZW5v
+dWdoLCcKU2FpZCBoaXMgZmF0aGVyOyBgZG9uJ3QgZ2l2ZSB5b3Vyc2VsZiBhaXJzIQpEbyB5b3Ug
+dGhpbmsgSSBjYW4gbGlzdGVuIGFsbCBkYXkgdG8gc3VjaCBzdHVmZj8KQmUgb2ZmLCBvciBJJ2xs
+IGtpY2sgeW91IGRvd24gc3RhaXJzIScK
+
+------- =_aaaaaaaaaa2--
+
+------- =_aaaaaaaaaa1--
+
+------- =_aaaaaaaaaa0--
+
+To: Foo Bar <foobar@nonexistent.net>
+Subject: Empty MIME Parts
+Date: Sat, 13 Jul 2002 00:43:18 +0300
+From: Sergey Poznyakoff <gray@Mirddin.farlep.net>
+
+------- =_aaaaaaaaaa0
+Content-Type: text/plain; name="empty"; charset="us-ascii"
+Content-ID: <5082.1026510189.1@Mirddin.farlep.net>
+Content-Description: Empty part
+
+
+------- =_aaaaaaaaaa0
+Content-Type: text/plain; name="single.line"; charset="us-ascii"
+Content-ID: <5082.1026510189.2@Mirddin.farlep.net>
+Content-Description: Single line part
+
+
+
+------- =_aaaaaaaaaa0--
+
+
+])
diff --git a/readmsg/tests/atlocal.in b/readmsg/tests/atlocal.in
new file mode 100644
index 000000000..aa0ba444d
--- /dev/null
+++ b/readmsg/tests/atlocal.in
@@ -0,0 +1,7 @@
+# @configure_input@ -*- shell-script -*-
+# Configurable variable values for Mailutils test suite.
+# Copyright (C) 2004, 2010 Free Software Foundation, Inc.
+
+PATH=@abs_builddir@:@abs_top_builddir@/readmsg:$top_srcdir:$srcdir:$PATH
+top_srcdir=@abs_top_srcdir@
+top_builddir=@abs_top_builddir@
diff --git a/readmsg/tests/hdr.at b/readmsg/tests/hdr.at
new file mode 100644
index 000000000..ffbcff518
--- /dev/null
+++ b/readmsg/tests/hdr.at
@@ -0,0 +1,37 @@
+# This file is part of GNU Mailutils. -*- Autotest -*-
+# Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+#
+# GNU Mailutils is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 3, or (at
+# your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Mailutils. If not, see <http://www.gnu.org/licenses/>.
+# This file is part of Mailfromd testsuite.
+
+READMSGTEST([readmsg -h],[hdr],
+[readmsg -h SOMETHING],
+[0],
+[From bar@dontmailme.org Fri Dec 28 23:28:09 2001
+Received: (from bar@dontmailme.org)
+ by dontmailme.org id fERKR9N16790
+ for foobar@nonexistent.net; Fri, 28 Dec 2001 22:18:08 +0200
+Date: Fri, 28 Dec 2001 23:28:08 +0200
+From: Bar <bar@dontmailme.org>
+To: Foo Bar <foobar@nonexistent.net>
+Message-Id: <200112232808.fERKR9N16790@dontmailme.org>
+Subject: Re: Jabberwocky
+
+It seems very pretty, but it's *rather* hard to understand!'
+Somehow it seems to fill my head with ideas -- only I don't
+exactly know what they are! However, SOMEBODY killed SOMETHING:
+that's clear, at any rate...
+
+
+]) \ No newline at end of file
diff --git a/readmsg/tests/nohdr.at b/readmsg/tests/nohdr.at
new file mode 100644
index 000000000..fb61e39a5
--- /dev/null
+++ b/readmsg/tests/nohdr.at
@@ -0,0 +1,27 @@
+# This file is part of GNU Mailutils. -*- Autotest -*-
+# Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+#
+# GNU Mailutils is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 3, or (at
+# your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Mailutils. If not, see <http://www.gnu.org/licenses/>.
+# This file is part of Mailfromd testsuite.
+
+READMSGTEST([readmsg -n],[nohdr],
+[readmsg -n SOMETHING],
+[0],
+[It seems very pretty, but it's *rather* hard to understand!'
+Somehow it seems to fill my head with ideas -- only I don't
+exactly know what they are! However, SOMEBODY killed SOMETHING:
+that's clear, at any rate...
+
+
+])
diff --git a/readmsg/tests/testsuite.at b/readmsg/tests/testsuite.at
new file mode 100644
index 000000000..e7e63f0c6
--- /dev/null
+++ b/readmsg/tests/testsuite.at
@@ -0,0 +1,54 @@
+# This file is part of GNU Mailutils. -*- Autotest -*-
+# Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+#
+# GNU Mailutils is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 3, or (at
+# your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Mailutils. If not, see <http://www.gnu.org/licenses/>.
+# This file is part of Mailfromd testsuite.
+
+# Require a reasonably recent autotest.
+m4_version_prereq([2.52g])
+m4_include([testsuite.inc])
+
+dnl ------------------------------------------------------------
+dnl READMSG_MAILBOX -- mailbox used for testing
+m4_define([READMSG_MAILBOX],[mbox1])
+
+dnl ------------------------------------------------------------
+dnl READMSG_OPTIONS -- default options for readmsg
+m4_define([READMSG_OPTIONS],[--no-site --no-user])
+
+dnl ------------------------------------------------------------
+dnl READMSGTEST(DESCR, KW, CMDLINE, [STATUS = `0'], [STDOUT = `'],
+dnl [STDERR = `'], [RUN-IF-FAIL], [RUN-IF-PASS])
+dnl
+m4_define([READMSGTEST],[
+AT_SETUP([$1])
+AT_KEYWORDS([$2])
+AT_CHECK([
+MAIL=$top_srcdir/testsuite/spool/READMSG_MAILBOX
+FOLDER=$MAIL
+export MAIL FOLDER
+readmsg READMSG_OPTIONS $3],
+m4_shift(m4_shift(m4_shift($@))))
+AT_CLEANUP])
+
+AT_INIT
+
+AT_TESTED([readmsg])
+
+MUT_VERSION(readmsg)
+m4_include([all.at])
+m4_include([twomsg.at])
+m4_include([hdr.at])
+m4_include([nohdr.at])
+m4_include([weed.at])
diff --git a/readmsg/tests/twomsg.at b/readmsg/tests/twomsg.at
new file mode 100644
index 000000000..a459927b0
--- /dev/null
+++ b/readmsg/tests/twomsg.at
@@ -0,0 +1,74 @@
+# This file is part of GNU Mailutils. -*- Autotes