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
@@ -1210,12 +1210,14 @@ AC_ARG_WITH([mh-bindir],
# Initialize the (autotest) test suite.
AC_CONFIG_TESTDIR(tests)
AC_CONFIG_FILES([frm/tests/Makefile
frm/tests/atlocal
+ readmsg/tests/Makefile
+ readmsg/tests/atlocal
sieve/tests/Makefile
sieve/tests/atlocal])
AM_MISSING_PROG([AUTOM4TE], [autom4te])
dnl Make sysconfdir available to the application
dnl This must be done LAST, since CPPFLAGS is passed by configure
@@ -1370,13 +1372,12 @@ AC_CONFIG_FILES([
pop3d/Makefile
pop3d/testsuite/Makefile
python/Makefile
python/libmu_py/Makefile
python/mailutils/Makefile
readmsg/Makefile
- readmsg/testsuite/Makefile
mu-aux/Makefile
mu-aux/mailutils.spec
sieve/Makefile
testsuite/Makefile
])
AC_OUTPUT
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
@@ -35,15 +35,13 @@ $(srcdir)/package.m4: $(top_srcdir)/configure.ac
#
## ------------ ##
## Test suite. ##
## ------------ ##
-TESTSUITE_AT = \
- testsuite.at\
- version.at
+TESTSUITE_AT = testsuite.at
TESTSUITE = $(srcdir)/testsuite
M4=m4
AUTOTEST = $(AUTOM4TE) --language=autotest
$(TESTSUITE): package.m4 $(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
@@ -75,17 +75,17 @@ imap4d_test "FETCH 1:* ENVELOPE"\
"OK"
# ALL Macro equivalent to: (FLAGS INTERNALDATE
# RFC822.SIZE 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"
# BODYSTRUCTURE The [MIME-IMB] body structure of the message. This
# is computed by the server by parsing the [MIME-IMB]
# header fields in the [RFC-822] header and
# [MIME-IMB] headers.
@@ -121,15 +121,15 @@ imap4d_test "FETCH 1:* BODY"\
# BODY.PEEK[<section>]<<partial>>
# An alternate form of BODY[<section>] that does not
# implicitly set the \Seen flag.
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"\
" for bar@dontmailme.org; Fri, 28 Dec 2001 22:18:08 +0200"\
"Date: Fri, 28 Dec 2001 22:18:08 +0200"\
"From: Foo Bar <foobar@nonexistent.net>"\
"Message-Id: <200112282018.fBSKI8N04906@nonexistent.net>"\
"To: Bar <bar@dontmailme.org>"\
@@ -141,15 +141,15 @@ imap4d_test "FETCH 1 BODY.PEEK\[HEADER\]"\
# The HEADER, HEADER.FIELDS, and HEADER.FIELDS.NOT
# part specifiers refer to the [RFC-822] header of
# the message or of an encapsulated [MIME-IMT]
# MESSAGE/RFC822 message.
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"\
" for bar@dontmailme.org; Fri, 28 Dec 2001 22:18:08 +0200"\
"Date: Fri, 28 Dec 2001 22:18:08 +0200"\
"From: Foo Bar <foobar@nonexistent.net>"\
"Message-Id: <200112282018.fBSKI8N04906@nonexistent.net>"\
"To: Bar <bar@dontmailme.org>"\
@@ -176,15 +176,15 @@ imap4d_test "FETCH 1 BODY\[HEADER.FIELDS (FROM TO SUBJECT)\]"\
"OK"
# similarly, the subset returned by HEADER.FIELDS.NOT contains only
# the header fields with a non-matching field-name.
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"\
" for bar@dontmailme.org; Fri, 28 Dec 2001 22:18:08 +0200"\
"Date: Fri, 28 Dec 2001 22:18:08 +0200"\
"Message-Id: <200112282018.fBSKI8N04906@nonexistent.net>"\
""\
")"\
@@ -416,15 +416,15 @@ imap4d_test "STORE 1:* -FLAGS (\\Seen)"\
# RFC822 Functionally equivalent to BODY[], differing in the
# syntax of the resulting untagged FETCH data (RFC822
# is returned).
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"\
" for bar@dontmailme.org; Fri, 28 Dec 2001 22:18:08 +0200"\
"Date: Fri, 28 Dec 2001 22:18:08 +0200"\
"From: Foo Bar <foobar@nonexistent.net>"\
"Message-Id: <200112282018.fBSKI8N04906@nonexistent.net>"\
"To: Bar <bar@dontmailme.org>"\
@@ -470,15 +470,15 @@ imap4d_test "FETCH 1 RFC822"\
# RFC822.HEADER Functionally equivalent to BODY.PEEK[HEADER],
# differing in the syntax of the resulting untagged
# FETCH data (RFC822.HEADER is returned).
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"\
" 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>"\
@@ -487,13 +487,13 @@ imap4d_test "FETCH 2 RFC822.HEADER"\
")"\
"OK"
# RFC822.SIZE The [RFC-822] size of the message.
imap4d_test "FETCH 3 RFC822.SIZE"\
-"3 FETCH (RFC822.SIZE 1668)"\
+"3 FETCH (RFC822.SIZE 1667)"\
"OK"
# RFC822.TEXT Functionally equivalent to BODY[TEXT], differing in
# the syntax of the resulting untagged FETCH data
# (RFC822.TEXT is returned).
imap4d_test "FETCH 2 RFC822.TEXT"\
@@ -507,19 +507,19 @@ imap4d_test "FETCH 2 RFC822.TEXT"\
"OK"
# FAST Macro equivalent to: (FLAGS INTERNALDATE
# RFC822.SIZE)
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"
# FULL Macro equivalent to: (FLAGS INTERNALDATE
# RFC822.SIZE ENVELOPE BODY)
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"
imap4d_stop
# End of fetch.exp
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
@@ -24,27 +24,27 @@ mail_command "set readonly"
# Test `size' command
#
# Note: when counting lines and sizes, mailutils API does not count envelope
# line and a delimiter line between headers and the body. Thus, number
# of lines is always two less then reported by BSD mail.
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 "
###########################################################################
# `headers' and `print'
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"\
" for bar@dontmailme.org; Fri, 28 Dec 2001 22:18:08 +0200"\
"Date: Fri, 28 Dec 2001 22:18:08 +0200"\
"From: Foo Bar <foobar@nonexistent.net>"\
"Message-Id: <200112282018.fBSKI8N04906@nonexistent.net>"\
"To: Bar <bar@dontmailme.org>"\
@@ -84,13 +84,13 @@ mail_test "print"\
"Did gyre and gimble in the wabe;"\
"All mimsy were the borogoves,"\
"And the mome raths outgrabe."
# Initially, `Print' must yield the same output as `print'
mail_test "Print"\
- "Received: (from foobar@nonexistent.net) "\
+ "Received: (from foobar@nonexistent.net)"\
" by nonexistent.net id fBSKI8N04906"\
" for bar@dontmailme.org; Fri, 28 Dec 2001 22:18:08 +0200"\
"Date: Fri, 28 Dec 2001 22:18:08 +0200"\
"From: Foo Bar <foobar@nonexistent.net>"\
"Message-Id: <200112282018.fBSKI8N04906@nonexistent.net>"\
"To: Bar <bar@dontmailme.org>"\
@@ -132,13 +132,13 @@ mail_test "Print"\
"And the mome raths outgrabe."
###########################################################################
# Test the `top' command
mail_test "top" \
- "Received: (from foobar@nonexistent.net) "\
+ "Received: (from foobar@nonexistent.net)"\
" by nonexistent.net id fBSKI8N04906"\
" for bar@dontmailme.org; Fri, 28 Dec 2001 22:18:08 +0200"\
"Date: Fri, 28 Dec 2001 22:18:08 +0200"\
"From: Foo Bar <foobar@nonexistent.net>"
mail_command "set toplines=10"
@@ -155,22 +155,22 @@ mail_test -message "top (2)" "top" \
"`Twas brillig, and the slithy toves"
###########################################################################
# This checks if `headers' correctly reflects 'read' attribute
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" \
###########################################################################
# `next' should display the 2nd message
mail_test "next" \
-"Received: (from bar@dontmailme.org) "\
+"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>"\
@@ -182,16 +182,16 @@ mail_test "next" \
"that's clear, at any rate..."
###########################################################################
# Now check if the cursor is placed correctly
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" \
###########################################################################
# Check for `prev'
mail_test "prev"\
"Received: (from foobar@nonexistent.net)"\
@@ -209,22 +209,22 @@ mail_test "prev"\
"And the mome raths outgrabe."
###########################################################################
# `headers' again
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" \
###########################################################################
# print with an argument
mail_test -message "print (2)" "print 2"\
-"Received: (from bar@dontmailme.org) "\
+"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>"\
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
@@ -39,51 +39,51 @@ mail_command "delete"
# http://lists.gnu.org/archive/html/bug-mailutils/2006-07/msg00023.html
mail_test "delete" "No applicable messages"
# Start again using the same mailbox
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"
# Send first message to mbox...
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"
# ... and quit
mail_test -noprompt "quit" \
"Saved 1 message in $MU_SPOOL_DIR/mbox" \
"Held 2 messages in $MU_SPOOL_DIR/mbox1"
# Now check the mbox contents
mail_start -reuse-spool "--file=%mbox"
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"
# Save messages to the third mailbox
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"
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"
mail_test -noprompt "quit" \
"Held 2 messages in $MU_SPOOL_DIR/mbox"
# Examine its contents
mail_start -reuse-spool "--file=$MU_FOLDER_DIR/three"
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"
# Test uppercase commands (Save and Copy)
mail_command "set outfolder=\"$MU_FOLDER_DIR\""
mail_test "Save" \
"\"$MU_FOLDER_DIR/gray\" 12/425"
diff --git a/mailbox/testsuite/Mime b/mailbox/testsuite/Mime
index 39cb23834..147c16ea4 100644
--- a/mailbox/testsuite/Mime
+++ b/mailbox/testsuite/Mime
@@ -18,15 +18,15 @@
# NOTE: Apart from this comment, the contents of this file is taken verbatim.
# Please be sure you don't add any extra newlines.
Message: 1
From: Foo Bar <foobar@nonexistent.net>
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
Begin
`Twas brillig, and the slithy toves
Did gyre and gimble in the wabe;
All mimsy were the borogoves,
And the mome raths outgrabe.
@@ -64,28 +64,28 @@ And the mome raths outgrabe.
End
Message: 2
From: Bar <bar@dontmailme.org>
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
Begin
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...
End
Message: 3
From: Sergey Poznyakoff <gray@Mirddin.farlep.net>
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
Message part size - 371/13: 141/4, 230/9
Text Message
Begin
How doth the little crocodile
Improve his shining tail,
@@ -115,13 +115,13 @@ Why, I do it again and again.'
End
Message: 4
From: Sergey Poznyakoff <gray@Mirddin.farlep.net>
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
Message part size - 496/14: 155/4, 341/10
Text Message
Begin
`You are old, Father William,' the young man said,
`And your hair has become very white;
@@ -193,13 +193,13 @@ End
End
Message: 5
From: Sergey Poznyakoff <gray@Mirddin.farlep.net>
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
Message part size - 143/4: 143/4, 0/0
Text Message
Begin
End
diff --git a/readmsg/Makefile.am b/readmsg/Makefile.am
index d22141fdd..844b1fe17 100644
--- a/readmsg/Makefile.am
+++ b/readmsg/Makefile.am
@@ -17,13 +17,13 @@
## along with this program; if not, write to the Free Software
## Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA
## 02110-1301 USA
INCLUDES = @MU_APP_COMMON_INCLUDES@
-SUBDIRS = testsuite
+SUBDIRS = tests
bin_PROGRAMS = readmsg
readmsg_SOURCES = readmsg.c msglist.c readmsg.h
readmsg_LDADD =\
${MU_APP_LIBRARIES}\
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.'
+
+