Commit 548d50fb 548d50fb19cd66dbe153e4d7e879501bab58c0aa by Sergey Poznyakoff

Rewrite libmailutils testsuite in Autotest.

* configure.ac: Create libmailutils/tests/atlocal and
libmailutils/tests/Makefile. Remove libmailutils/testsuite.
* examples/Makefile.am (noinst_PROGRAMS): Remove programs moved
to libmailutils/tests.
* examples/argcv.c -> libmailutils/tests/argcv.c
* libmailutils/testsuite/Decode -> libmailutils/tests/Decode
* libmailutils/testsuite/Encode -> libmailutils/tests/Encode
* examples/decode2047.c: Move to libmailutils/tests
* examples/encode2047.c: Move to libmailutils/tests
* examples/mailcap.c: Likewise.
* examples/url-parse.c: Likewise.

* include/mailutils/Makefile.am: Minor changes.
* libmailutils/Makefile.am (SUBDIRS): Replace testsuite with tests.
* libmailutils/tests/Makefile.am: New file.
* libmailutils/tests/addr.c: New file.
* libmailutils/tests/address.at: New file.
* libmailutils/tests/argcv.at: New file.
* libmailutils/tests/atlocal.in: New file.
* libmailutils/tests/base64d.at: New file.
* libmailutils/tests/base64e.at: New file.
* libmailutils/tests/decode2047.at: New file.
* libmailutils/tests/encode2047.at: New file.
* libmailutils/tests/fltst.c: New file.
* libmailutils/tests/mailcap.at: New file.
* libmailutils/tests/mime.at: New file.
* libmailutils/tests/testsuite.at: New file.
* libmailutils/tests/url.at: New file.

* libmailutils/testsuite/: Delete.

* frm/tests/Makefile.am: Prefix package.m4 creation commands with $(AM_V_GEN).
* readmsg/tests/Makefile.am: Likewise.
* sieve/tests/Makefile.am: Likewise.
* frm/tests/testsuite.at: Minor changes.
* readmsg/tests/testsuite.at: Include testsuite.inc.
* sieve/tests/testsuite.at: Likewise.
* sieve/tests/version.at: Comment out inclusion of testsuite.inc.
* testsuite/testsuite.inc: Add m4_version_prereq.
1 parent 7b79a6ed
Showing 54 changed files with 2894 additions and 2746 deletions
......@@ -1211,7 +1211,9 @@ AC_ARG_WITH([mh-bindir],
# Initialize the (autotest) test suite.
AC_CONFIG_TESTDIR(tests)
AC_CONFIG_FILES([frm/tests/Makefile
AC_CONFIG_FILES([libmailutils/tests/Makefile
libmailutils/tests/atlocal
frm/tests/Makefile
frm/tests/atlocal
readmsg/tests/Makefile
readmsg/tests/atlocal
......@@ -1362,7 +1364,6 @@ AC_CONFIG_FILES([
mail/Makefile
mail/testsuite/Makefile
libmailutils/Makefile
libmailutils/testsuite/Makefile
messages/Makefile
messages/testsuite/Makefile
mh/Makefile
......
......@@ -35,18 +35,13 @@ SUBDIRS = config $(CPP_DIR) python scheme
noinst_PROGRAMS = \
aclck\
addr\
argcv\
base64\
decode2047\
echosrv\
encode2047\
header\
http\
iconv\
listop\
lsf\
mailcap\
mimetest\
msg-send\
mta\
mucat\
......@@ -56,8 +51,7 @@ noinst_PROGRAMS = \
musocio\
$(NNTPCLIENT)\
$(POP3CLIENT)\
sfrom\
url-parse
sfrom
EXTRA_PROGRAMS = pop3client nntpclient
......@@ -79,15 +73,6 @@ numaddr_la_SOURCES = numaddr.c
numaddr_la_LIBADD = ${MU_LIB_SIEVE}
numaddr_la_LDFLAGS = -module -avoid-version -no-undefined -rpath '$(moddir)'
mimetest_LDADD =\
../lib/libmuaux.la\
${MU_LIB_MBOX}\
${MU_LIB_IMAP}\
${MU_LIB_POP}\
${MU_LIB_AUTH}\
@MU_AUTHLIBS@\
${MU_LIB_MAILUTILS}
msg_send_LDADD =\
../lib/libmuaux.la\
${MU_LIB_MAILER}\
......
......@@ -23,7 +23,7 @@ MAINTAINERCLEANFILES = Makefile.in $(TESTSUITE)
## ------------ ##
$(srcdir)/package.m4: $(top_srcdir)/configure.ac
{ \
$(AM_V_GEN){ \
echo '# Signature of the current package.'; \
echo 'm4_define([AT_PACKAGE_NAME], [@PACKAGE_NAME@])'; \
echo 'm4_define([AT_PACKAGE_TARNAME], [@PACKAGE_TARNAME@])'; \
......
......@@ -15,10 +15,7 @@
# 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_define([AT_SKIP_TEST],[exit 77])
m4_include([testsuite.inc])
dnl ------------------------------------------------------------
dnl FRM_MAILBOX -- mailbox used for testing
......@@ -47,8 +44,6 @@ AT_INIT
AT_TESTED([frm])
m4_include([testsuite.inc])
MUT_VERSION(frm)
FRMTEST([no options],[frm00],
......
......@@ -20,7 +20,7 @@
BUILT_SOURCES=errno.h debug.h
EXTRA_DIST=errno.hin debug.hm4 types.hin
errno.h: $(top_srcdir)/mailbox/errors errno.hin
errno.h: $(top_srcdir)/libmailutils/errors errno.hin
$(AM_V_GEN)$(AWK) -f $(mu_aux_dir)/generr.awk $^ > $@
debug.h: $(mu_aux_dir)/debugdef.m4 debug.hm4
......
......@@ -24,7 +24,7 @@ YLWRAP = $(SHELL) $(mu_aux_dir)/gylwrap
AM_YFLAGS=-vt
AM_LFLAGS=-dvp
SUBDIRS = testsuite
SUBDIRS = tests
lib_LTLIBRARIES = libmailutils.la
......
# 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
$(AM_V_GEN){ \
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
#
## -------------------------- ##
## Non-installable programs
## -------------------------- ##
INCLUDES = @MU_LIB_COMMON_INCLUDES@
noinst_PROGRAMS = \
addr\
argcv\
decode2047\
encode2047\
fltst\
mailcap\
mimetest\
url-parse
LDADD =\
../../lib/libmuaux.la\
${MU_LIB_MBOX}\
${MU_LIB_IMAP}\
${MU_LIB_POP}\
${MU_LIB_AUTH}\
@MU_AUTHLIBS@\
${MU_LIB_MAILUTILS}
EXTRA_DIST += Encode Decode
## ------------ ##
## Test suite. ##
## ------------ ##
TESTSUITE_AT = \
address.at\
argcv.at\
base64d.at\
base64e.at\
decode2047.at\
encode2047.at\
mailcap.at\
mime.at\
testsuite.at\
url.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
/* GNU Mailutils -- a suite of utilities for electronic mail
Copyright (C) 1999, 2000, 2001, 2004, 2005, 2007, 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.
GNU Mailutils 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, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02110-1301 USA */
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <mailutils/address.h>
#include <mailutils/errno.h>
#include <mailutils/kwd.h>
#include <mailutils/mutil.h>
#define EPARSE MU_ERR_NOENT
int
main (int argc, char *argv[])
{
char *str;
size_t i;
size_t pcount = 0;
int status;
const char *buf;
mu_address_t address = NULL;
struct mu_address hint;
if (argc != 2)
{
fprintf (stderr, "usage: %s address\n", argv[0]);
return 2;
}
str = argv[1];
hint.domain = "localhost";
status = mu_address_create_hint (&address, str, &hint, MU_ADDR_HINT_DOMAIN);
mu_address_get_count (address, &pcount);
if (status)
{
fprintf (stderr, "%s\n", mu_errname (status));
return 1;
}
else
printf ("naddr: %lu\n", (unsigned long) pcount);
for (i = 1; i <= pcount; i++)
{
int isgroup;
mu_address_is_group (address, i, &isgroup);
printf ("%lu. ", (unsigned long) i);
if (isgroup)
{
mu_address_sget_personal (address, i, &buf);
printf ("group <%s>:\n", buf);
}
else
{
mu_address_sget_email (address, i, &buf);
printf ("email <%s>:\n", buf);
}
if (mu_address_sget_personal (address, i, &buf) == 0 && buf && !isgroup)
printf ("personal <%s>\n", buf);
if (mu_address_sget_comments (address, i, &buf) == 0 && buf)
printf ("comments <%s>\n", buf);
if (mu_address_sget_local_part (address, i, &buf) == 0 && buf)
{
printf ("local-part <%s>", buf);
if (mu_address_sget_domain (address, i, &buf) == 0 && buf)
printf (" domain <%s>", buf);
printf ("\n");
}
if (mu_address_sget_route (address, i, &buf) == 0 && buf)
printf ("route <%s>\n", buf);
}
mu_address_destroy (&address);
return 0;
}
# 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.
dnl ------------------------------------------------------------
dnl TESTADDR(ADDR, [KW = `'], [STATUS = `0'], [STDOUT = `'],
dnl [STDERR = `'], [RUN-IF-FAIL], [RUN-IF-PASS])
dnl
m4_define([TESTADDR],[
AT_SETUP([Address: [$1]])
AT_KEYWORDS([address $2])
AT_CHECK([addr '[$1]'],m4_shift(m4_shift($@)))
AT_CLEANUP
])
TESTADDR([Sam <@[matrix (smtp)], @[nexus: [node 12]]:sroberts@[10].[1]>],[],
[1],
[],
[MU_ERR_BAD_822_FORMAT
])
TESTADDR([a@b,z@y],[],
[0],
[naddr: 2
1. email <a@b>:
local-part <a> domain <b>
2. email <z@y>:
local-part <z> domain <y>
])
TESTADDR([,a@b,z@y],[],
[0],
[naddr: 2
1. email <a@b>:
local-part <a> domain <b>
2. email <z@y>:
local-part <z> domain <y>
])
TESTADDR([a@b,z@y,],[],
[0],
[naddr: 2
1. email <a@b>:
local-part <a> domain <b>
2. email <z@y>:
local-part <z> domain <y>
])
TESTADDR([,a@b,z@y,],[],
[0],
[naddr: 2
1. email <a@b>:
local-part <a> domain <b>
2. email <z@y>:
local-part <z> domain <y>
])
TESTADDR([a@b,,z@y],[],
[0],
[naddr: 2
1. email <a@b>:
local-part <a> domain <b>
2. email <z@y>:
local-part <z> domain <y>
])
TESTADDR([a@b,,,z@y],[],
[0],
[naddr: 2
1. email <a@b>:
local-part <a> domain <b>
2. email <z@y>:
local-part <z> domain <y>
])
TESTADDR([,,,a@b,,,],[],
[0],
[naddr: 1
1. email <a@b>:
local-part <a> domain <b>
])
TESTADDR([,a@b],[],
[0],
[naddr: 1
1. email <a@b>:
local-part <a> domain <b>
])
TESTADDR([a@b,],[],
[0],
[naddr: 1
1. email <a@b>:
local-part <a> domain <b>
])
TESTADDR([,],[],
[1],
[],
[MU_ERR_EMPTY_ADDRESS
])
TESTADDR([,,],[],
[1],
[],
[MU_ERR_EMPTY_ADDRESS
])
TESTADDR([,,],[],
[1],
[],
[MU_ERR_EMPTY_ADDRESS
])
TESTADDR([a group: a@b,z@y;],[group],
[0],
[naddr: 2
1. email <a@b>:
local-part <a> domain <b>
2. email <z@y>:
local-part <z> domain <y>
])
TESTADDR([a group: ,a@b,z@y;],[group],
[0],
[naddr: 2
1. email <a@b>:
local-part <a> domain <b>
2. email <z@y>:
local-part <z> domain <y>
])
TESTADDR([a group: a@b,z@y,;],[group],
[0],
[naddr: 2
1. email <a@b>:
local-part <a> domain <b>
2. email <z@y>:
local-part <z> domain <y>
])
TESTADDR([a group: ,a@b,z@y,;],[group],
[0],
[naddr: 2
1. email <a@b>:
local-part <a> domain <b>
2. email <z@y>:
local-part <z> domain <y>
])
TESTADDR([a group: a@b,,z@y;],[group],
[0],
[naddr: 2
1. email <a@b>:
local-part <a> domain <b>
2. email <z@y>:
local-part <z> domain <y>
])
TESTADDR([a group: a@b,,,z@y;],[group],
[0],
[naddr: 2
1. email <a@b>:
local-part <a> domain <b>
2. email <z@y>:
local-part <z> domain <y>
])
TESTADDR([a group: ,,,a@b,,, ;],[group],
[0],
[naddr: 1
1. email <a@b>:
local-part <a> domain <b>
])
TESTADDR([a group: ,a@b ;],[group],
[0],
[naddr: 1
1. email <a@b>:
local-part <a> domain <b>
])
TESTADDR([a group: a@b, ;],[group],
[0],
[naddr: 1
1. email <a@b>:
local-part <a> domain <b>
])
TESTADDR([a group: , ;],[group],
[1],
[],
[MU_ERR_EMPTY_ADDRESS
])
TESTADDR([a group: ,, ;],[group],
[1],
[],
[MU_ERR_EMPTY_ADDRESS
])
TESTADDR([a group: ,, ;],[group],
[1],
[],
[MU_ERR_EMPTY_ADDRESS
])
TESTADDR([Sam <@[matrix (smtp)], @[nexus: [node 12]]:sroberts@[10].[1]> ;],[],
[1],
[],
[MU_ERR_BAD_822_FORMAT
])
TESTADDR([Aliens: Sam <@[matrix (smtp)]: sam@sam>, sroberts@[10].[1];],[],
[0],
[[naddr: 2
1. email <sam@sam>:
personal <Sam>
local-part <sam> domain <sam>
route <@[matrix (smtp)]>
2. email <sroberts@[10].[1]>:
local-part <sroberts> domain <[10].[1]>
]])
TESTADDR([lo@hi, Aliens: Sam <@[matrix (smtp)]: sam@sam>, sroberts@[10].[1];],
[],
[0],
[[naddr: 3
1. email <lo@hi>:
local-part <lo> domain <hi>
2. email <sam@sam>:
personal <Sam>
local-part <sam> domain <sam>
route <@[matrix (smtp)]>
3. email <sroberts@[10].[1]>:
local-part <sroberts> domain <[10].[1]>
]])
TESTADDR([Aliens: Sam <@[matrix (smtp)]: sam@sam>, sroberts@[10].[1];, hi@lo],
[],
[0],
[[naddr: 3
1. email <sam@sam>:
personal <Sam>
local-part <sam> domain <sam>
route <@[matrix (smtp)]>
2. email <sroberts@[10].[1]>:
local-part <sroberts> domain <[10].[1]>
3. email <hi@lo>:
local-part <hi> domain <lo>
]])
TESTADDR([lo@hi, Aliens: Sam <@[matrix (smtp)]: sam@sam>, sroberts@[10].[1];, hi@lo],
[],
[0],
[[naddr: 4
1. email <lo@hi>:
local-part <lo> domain <hi>
2. email <sam@sam>:
personal <Sam>
local-part <sam> domain <sam>
route <@[matrix (smtp)]>
3. email <sroberts@[10].[1]>:
local-part <sroberts> domain <[10].[1]>
4. email <hi@lo>:
local-part <hi> domain <lo>
]])
TESTADDR([Sam <@mail2.uniserve.com:sroberts@uniserve.com>],[],
[0],
[naddr: 1
1. email <sroberts@uniserve.com>:
personal <Sam>
local-part <sroberts> domain <uniserve.com>
route <@mail2.uniserve.com>
])
TESTADDR([< (hey) @ (hey, )smtp1.sympatico.ca, mail2.uniserve.com (hoo!):sroberts@uniserve.com>],[],
[1],
[],
[MU_ERR_BAD_822_FORMAT
])
TESTADDR([hw@570.com (Hardware Support Account)],[],
[0],
[naddr: 1
1. email <hw@570.com>:
personal <Hardware Support Account>
local-part <hw> domain <570.com>
])
TESTADDR([list-ietf-wg-apps-drums@faerber.muc.de (=?ISO-8859-1?Q?Claus_F=E4rber?=)],[],
[0],
[naddr: 1
1. email <list-ietf-wg-apps-drums@faerber.muc.de>:
personal <=?ISO-8859-1?Q?Claus_F=E4rber?=>
local-part <list-ietf-wg-apps-drums> domain <faerber.muc.de>
])
TESTADDR([<mutt-dev@mutt.org>(mutt #369), guug-bugs-closed@guug.de (#369)],[],
[0],
[naddr: 2
1. email <mutt-dev@mutt.org>:
local-part <mutt-dev> domain <mutt.org>
2. email <guug-bugs-closed@guug.de>:
personal <#369>
local-part <guug-bugs-closed> domain <guug.de>
])
dnl --------------------------------------------------------------------------
dnl FIXME:
m4_if([TESTADDR(["'Aernoudt Bottemanne'" <Aernoudt.Bottemanne@Informix.com>],[],
[0],
[naddr: 1
1. email <Aernoudt.Bottemanne@Informix.com>:
personal <'Aernoudt Bottemanne'>
local-part <Aernoudt.Bottemanne> domain <Informix.com>
])
TESTADDR(["'Haag, Ullrich - MBDC'" <Ullrich.Haag@MBDC.com>,],[],
[0],
[naddr: 1
1. email <Ullrich.Haag@MBDC.com>:
personal <'Haag, Ullrich - MBDC'>
local-part <Ullrich.Haag> domain <MBDC.com>
])
TESTADDR(["'Michael C. Ibarra'" <ibarra@hawk.com>, arl@q7.net, Al <arl@q7.net>],
[],
[0],
[naddr: 3
1. email <ibarra@hawk.com>:
personal <'Michael C. Ibarra'>
local-part <ibarra> domain <hawk.com>
2. email <arl@q7.net>:
local-part <arl> domain <q7.net>
3. email <arl@q7.net>:
personal <Al>
local-part <arl> domain <q7.net>
])
TESTADDR(["'Sam Roberts'" <sam@cogent.ca>],[],
[0],
[naddr: 1
1. email <sam@cogent.ca>:
personal <'Sam Roberts'>
local-part <sam> domain <cogent.ca>
])
TESTADDR(["'paul@pitbull-productions.com'" <paul@pitbull-productions.com>,],[],
[0],
[naddr: 1
1. email <paul@pitbull-productions.com>:
personal <'paul@pitbull-productions.com'>
local-part <paul> domain <pitbull-productions.com>
])
TESTADDR(["'sam@cogent.ca'" <sam@cogent.ca>, "'sroberts@uniserve.com'"],[],
[1],
[],
[MU_ERR_BAD_822_FORMAT
])
TESTADDR(["'sroberts\@certicom\.ca'" <sroberts@certicom.ca>],[]
[0],
[naddr: 1
1. email <sroberts@certicom.ca>:
personal <'sroberts@certicom.ca'>
local-part <sroberts> domain <certicom.ca>
])
])
dnl --------------------------------------------------------------------------
TESTADDR(["=?iso-8859-1?Q?Juan_Carlos_Marcos_Rodr=EDguez?=" <jcmarcos@datavoice.es>],[],
[0],
[naddr: 1
1. email <jcmarcos@datavoice.es>:
personal <=?iso-8859-1?Q?Juan_Carlos_Marcos_Rodr=EDguez?=>
local-part <jcmarcos> domain <datavoice.es>
])
TESTADDR(["Christian Edward Gruber" <christian.edward.gruber@gmx.net>,],[],
[0],
[naddr: 1
1. email <christian.edward.gruber@gmx.net>:
personal <Christian Edward Gruber>
local-part <christian.edward.gruber> domain <gmx.net>
])
TESTADDR(["D. J. Bernstein" <"djb- "@cr.yp.to>],[],
[0],
[naddr: 1
1. email <"djb- "@cr.yp.to>:
personal <D. J. Bernstein>
local-part <djb- > domain <cr.yp.to>
])
TESTADDR(["D. J. Bernstein" <djb@cr.yp.to>, drums@cs.utk.edu],[],
[0],
[naddr: 2
1. email <djb@cr.yp.to>:
personal <D. J. Bernstein>
local-part <djb> domain <cr.yp.to>
2. email <drums@cs.utk.edu>:
local-part <drums> domain <cs.utk.edu>
])
TESTADDR(["Dave Sill <de5-drums" <de5-drums@sws5.ctd.ornl.gov>],[],
[0],
[naddr: 1
1. email <de5-drums@sws5.ctd.ornl.gov>:
personal <Dave Sill <de5-drums>
local-part <de5-drums> domain <sws5.ctd.ornl.gov>
])
TESTADDR(["Dave \(work\) Baerg \(E-mail\)" <Dave.Baerg@SUMMedia.com>],[],
[0],
[naddr: 1
1. email <Dave.Baerg@SUMMedia.com>:
personal <Dave (work) Baerg (E-mail)>
local-part <Dave.Baerg> domain <SUMMedia.com>
])
TESTADDR(["Demian" <damient@wave.home.com>],[],
[0],
[naddr: 1
1. email <damient@wave.home.com>:
personal <Demian>
local-part <damient> domain <wave.home.com>
])
TESTADDR(["Detailed Revision/Update of Message Standards" <drums@cs.utk.edu>],[],
[0],
[naddr: 1
1. email <drums@cs.utk.edu>:
personal <Detailed Revision/Update of Message Standards>
local-part <drums> domain <cs.utk.edu>
])
TESTADDR(["Fred" <fprog@__nowhere__.users.sourceforge.net>],[],
[0],
[naddr: 1
1. email <fprog@__nowhere__.users.sourceforge.net>:
personal <Fred>
local-part <fprog> domain <__nowhere__.users.sourceforge.net>
])
TESTADDR(["Haag, Ullrich - MBDC" <Ullrich.Haag@MBDC.com>],[],
[0],
[naddr: 1
1. email <Ullrich.Haag@MBDC.com>:
personal <Haag, Ullrich - MBDC>
local-part <Ullrich.Haag> domain <MBDC.com>
])
TESTADDR(["Jacob Palme" <jpalme@dsv.su.se>, <drums@cs.utk.edu>],[],
[0],
[naddr: 2
1. email <jpalme@dsv.su.se>:
personal <Jacob Palme>
local-part <jpalme> domain <dsv.su.se>
2. email <drums@cs.utk.edu>:
local-part <drums> domain <cs.utk.edu>
])
dnl FIXME
m4_if([
TESTADDR(["Jakob 'sparky' Kaivo" <jkaivo@elijah.nodomainname.net>],[],
[0],
[naddr: 1
1. email <jkaivo@elijah.nodomainname.net>:
personal <Jakob 'sparky' Kaivo>
local-part <jkaivo> domain <elijah.nodomainname.net>
])
])
TESTADDR(["Lee R. Copp" <Lee.R.Copp@MichiganScientific.com>],[],
[0],
[naddr: 1
1. email <Lee.R.Copp@MichiganScientific.com>:
personal <Lee R. Copp>
local-part <Lee.R.Copp> domain <MichiganScientific.com>
])
TESTADDR(["Lionel Johnson" <ljohnson**nospam**@sterling1.com>],[],
[0],
[naddr: 1
1. email <ljohnson**nospam**@sterling1.com>:
personal <Lionel Johnson>
local-part <ljohnson**nospam**> domain <sterling1.com>
])
TESTADDR(["Martin [Keso] Keseg" <Martin.Keseg@slovakia.sun.com>],[],
[0],
[[naddr: 1
1. email <Martin.Keseg@slovakia.sun.com>:
personal <Martin [Keso] Keseg>
local-part <Martin.Keseg> domain <slovakia.sun.com>
]])
TESTADDR(["}{ristoph" <news2@kristoph.net>],[],
[0],
[naddr: 1
1. email <news2@kristoph.net>:
personal <}{ristoph>
local-part <news2> domain <kristoph.net>
])
TESTADDR(["fmartens-2000" <fmartens-2000@planet.nl>],[],
[0],
[naddr: 1
1. email <fmartens-2000@planet.nl>:
personal <fmartens-2000>
local-part <fmartens-2000> domain <planet.nl>
])
dnl FIXME
m4_if([
TESTADDR(["g'o'tz ohnesorge" <gohnesorge@lh-computertechnik.de>],[],
[0],
[naddr: 1
1. email <gohnesorge@lh-computertechnik.de>:
personal <g'o'tz ohnesorge>
local-part <gohnesorge> domain <lh-computertechnik.de>
])
])
TESTADDR(["gao jie" <jiegi@public.wh.hb.cn>],[],
[0],
[naddr: 1
1. email <jiegi@public.wh.hb.cn>:
personal <gao jie>
local-part <jiegi> domain <public.wh.hb.cn>
])
TESTADDR(["gnupg-devel@gnupg.org" <gnupg-devel%gnupg.org@f48.n48.z2.fidonet.org>],
[],
[0],
[naddr: 1
1. email <gnupg-devel%gnupg.org@f48.n48.z2.fidonet.org>:
personal <gnupg-devel@gnupg.org>
local-part <gnupg-devel%gnupg.org> domain <f48.n48.z2.fidonet.org>
])
TESTADDR(["gpg-devel" <gnupg-devel@gnupg.org>],[],
[0],
[naddr: 1
1. email <gnupg-devel@gnupg.org>:
personal <gpg-devel>
local-part <gnupg-devel> domain <gnupg.org>
])
TESTADDR(["jigang" <jigang@jinglun.com.cn>],[],
[0],
[naddr: 1
1. email <jigang@jinglun.com.cn>:
personal <jigang>
local-part <jigang> domain <jinglun.com.cn>
])
TESTADDR(["misc@openbsd.org" <misc@openbsd.org>],[],
[0],
[naddr: 1
1. email <misc@openbsd.org>:
personal <misc@openbsd.org>
local-part <misc> domain <openbsd.org>
])
TESTADDR(["misc@openbsd.org" <misc@openbsd.org>, brian@Awfulhak.org],[],
[0],
[naddr: 2
1. email <misc@openbsd.org>:
personal <misc@openbsd.org>
local-part <misc> domain <openbsd.org>
2. email <brian@Awfulhak.org>:
local-part <brian> domain <Awfulhak.org>
])
TESTADDR(["mutt-dev @ mutt . orgThomas Roessler" <roessler@does-not-exist.org>],[],
[0],
[naddr: 1
1. email <roessler@does-not-exist.org>:
personal <mutt-dev @ mutt . orgThomas Roessler>
local-part <roessler> domain <does-not-exist.org>
])
TESTADDR(["zwk@f36.n480.z2.fidonet.org" <zwk%f36.n480.z2.fidonet.org@f36.n480.z2.fidonet.org>],[],
[0],
[naddr: 1
1. email <zwk%f36.n480.z2.fidonet.org@f36.n480.z2.fidonet.org>:
personal <zwk@f36.n480.z2.fidonet.org>
local-part <zwk%f36.n480.z2.fidonet.org> domain <f36.n480.z2.fidonet.org>
])
dnl FIXME
m4_if([
TESTADDR(['Dan Dall'Acqua' <ddallacqua@noetic.ab.ca>, 'Dave Shyong'],[],
[1],
[],
[MU_ERR_BAD_822_FORMAT
])
])
TESTADDR([0xdeadbeef-request@petting-zoo.net],[],
[0],
[naddr: 1
1. email <0xdeadbeef-request@petting-zoo.net>:
local-part <0xdeadbeef-request> domain <petting-zoo.net>
])
TESTADDR([102023-00406421@cnxt19932218.conexant.com],[],
[0],
[naddr: 1
1. email <102023-00406421@cnxt19932218.conexant.com>:
local-part <102023-00406421> domain <cnxt19932218.conexant.com>
])
TESTADDR([218164.24.43@jobcontrolcenter.com],[],
[0],
[naddr: 1
1. email <218164.24.43@jobcontrolcenter.com>:
local-part <218164.24.43> domain <jobcontrolcenter.com>
])
TESTADDR([<0xdeadbeef-request@petting-zoo.net>],[],
[0],
[naddr: 1
1. email <0xdeadbeef-request@petting-zoo.net>:
local-part <0xdeadbeef-request> domain <petting-zoo.net>
])
TESTADDR([<>],[],
[0],
[naddr: 1
1. email <>:
])
TESTADDR([<Christia.Roberts@nrc.ca>],[],
[0],
[naddr: 1
1. email <Christia.Roberts@nrc.ca>:
local-part <Christia.Roberts> domain <nrc.ca>
])
TESTADDR([<Nick_Shelness@motorcity2.lotus.com>],[],
[0],
[naddr: 1
1. email <Nick_Shelness@motorcity2.lotus.com>:
local-part <Nick_Shelness> domain <motorcity2.lotus.com>
])
TESTADDR([<all: >],[],
[1],
[],
[MU_ERR_BAD_822_FORMAT
])
TESTADDR([<fyi-admin@emyr.net>],[],
[0],
[naddr: 1
1. email <fyi-admin@emyr.net>:
local-part <fyi-admin> domain <emyr.net>
])
TESTADDR([<gary.stefanov@medtronic.com>, <HdeVisse@husky.ca>,],[],
[0],
[naddr: 2
1. email <gary.stefanov@medtronic.com>:
local-part <gary.stefanov> domain <medtronic.com>
2. email <HdeVisse@husky.ca>:
local-part <HdeVisse> domain <husky.ca>
])
TESTADDR([<gnu-pop-list@nodomainname.net>],[],
[0],
[naddr: 1
1. email <gnu-pop-list@nodomainname.net>:
local-part <gnu-pop-list> domain <nodomainname.net>
])
TESTADDR([<mutt-dev-owner-sroberts=uniserve.com@ns.gbnet.net>],[],
[0],
[naddr: 1
1. email <mutt-dev-owner-sroberts=uniserve.com@ns.gbnet.net>:
local-part <mutt-dev-owner-sroberts=uniserve.com> domain <ns.gbnet.net>
])
TESTADDR([=?ISO-8859-1?Q?Kolbj=F8rn_Barmen?= <kolla@nvg.ntnu.no>],[],
[0],
[naddr: 1
1. email <kolla@nvg.ntnu.no>:
personal <=?ISO-8859-1?Q?Kolbj=F8rn_Barmen?=>
local-part <kolla> domain <nvg.ntnu.no>
])
TESTADDR([=?ISO-8859-1?Q?Patrik_F=E4ltstr=F6m?= <paf@cisco.com>],[],
[0],
[naddr: 1
1. email <paf@cisco.com>:
personal <=?ISO-8859-1?Q?Patrik_F=E4ltstr=F6m?=>
local-part <paf> domain <cisco.com>
])
TESTADDR([=?ISO-8859-1?Q?Patrik_F=E4ltstr=F6m?= <paf@cisco.com>,],[],
[0],
[naddr: 1
1. email <paf@cisco.com>:
personal <=?ISO-8859-1?Q?Patrik_F=E4ltstr=F6m?=>
local-part <paf> domain <cisco.com>
])
TESTADDR([=?US-ASCII?Q?gary=5Fc?= <gary_c@cunningham-lee.com>],[],
[0],
[naddr: 1
1. email <gary_c@cunningham-lee.com>:
personal <=?US-ASCII?Q?gary=5Fc?=>
local-part <gary_c> domain <cunningham-lee.com>
])
TESTADDR([=?iso-8859-1?Q?Fr=E9d=E9ric_L_=2E_W_=2E?= Meunier <0@pervalidus.net>],[],
[0],
[naddr: 1
1. email <0@pervalidus.net>:
personal <=?iso-8859-1?Q?Fr=E9d=E9ric_L_=2E_W_=2E?= Meunier>
local-part <0> domain <pervalidus.net>
])
TESTADDR([=?iso-8859-1?Q?Fr=E9d=E9ric_L_=2E_W_=2E?= Meunier <0@pervalidus.net>,],[],
[0],
[naddr: 1
1. email <0@pervalidus.net>:
personal <=?iso-8859-1?Q?Fr=E9d=E9ric_L_=2E_W_=2E?= Meunier>
local-part <0> domain <pervalidus.net>
])
TESTADDR([=?iso-8859-1?Q?Fr=E9d=E9ric_L_=2E_W_=2E_Meunier?= <0@pervalidus.net>],[],
[0],
[naddr: 1
1. email <0@pervalidus.net>:
personal <=?iso-8859-1?Q?Fr=E9d=E9ric_L_=2E_W_=2E_Meunier?=>
local-part <0> domain <pervalidus.net>
])
TESTADDR([=?iso-8859-1?Q?J=F8rgen_Thomsen?= <jth@postfix.jth.net>],[],
[0],
[naddr: 1
1. email <jth@postfix.jth.net>:
personal <=?iso-8859-1?Q?J=F8rgen_Thomsen?=>
local-part <jth> domain <postfix.jth.net>
])
TESTADDR([=?iso-8859-1?Q?Jos=3F_C=2E_Garc=EDa_Sogo?= <jose@jaimedelamo.eu.org>],[],
[0],
[naddr: 1
1. email <jose@jaimedelamo.eu.org>:
personal <=?iso-8859-1?Q?Jos=3F_C=2E_Garc=EDa_Sogo?=>
local-part <jose> domain <jaimedelamo.eu.org>
])
TESTADDR([=?iso-8859-1?Q?Mikko_H=E4nninen?= <Mikko.Hanninen@dna.fi>],[],
[0],
[naddr: 1
1. email <Mikko.Hanninen@dna.fi>:
personal <=?iso-8859-1?Q?Mikko_H=E4nninen?=>
local-part <Mikko.Hanninen> domain <dna.fi>
])
TESTADDR([=?iso-8859-1?Q?Mikko_H=E4nninen?= <Mikko.Hanninen@iki.fi>],[],
[0],
[naddr: 1
1. email <Mikko.Hanninen@iki.fi>:
personal <=?iso-8859-1?Q?Mikko_H=E4nninen?=>
local-part <Mikko.Hanninen> domain <iki.fi>
])
TESTADDR([=?iso-8859-1?Q?R=E9mi_Guyomarch?= <rguyom@321.net>],[],
[0],
[naddr: 1
1. email <rguyom@321.net>:
personal <=?iso-8859-1?Q?R=E9mi_Guyomarch?=>
local-part <rguyom> domain <321.net>
])
TESTADDR([=?iso-8859-1?Q?Ulf_M=F6ller?= <ulf@fitug.de>],[],
[0],
[naddr: 1
1. email <ulf@fitug.de>:
personal <=?iso-8859-1?Q?Ulf_M=F6ller?=>
local-part <ulf> domain <fitug.de>
])
TESTADDR([ANDREW MARTIN <amartin@ee.ryerson.ca>],[],
[0],
[naddr: 1
1. email <amartin@ee.ryerson.ca>:
personal <ANDREW MARTIN>
local-part <amartin> domain <ee.ryerson.ca>
])
TESTADDR([Abhay Ghaisas <abhay@sobolev.does-not-exist.org>, mutt-dev@mutt.org],[],
[0],
[naddr: 2
1. email <abhay@sobolev.does-not-exist.org>:
personal <Abhay Ghaisas>
local-part <abhay> domain <sobolev.does-not-exist.org>
2. email <mutt-dev@mutt.org>:
local-part <mutt-dev> domain <mutt.org>
])
TESTADDR([Brian Salter-Duke <b_duke@lacebark.ntu.edu.au>],[],
[0],
[naddr: 1
1. email <b_duke@lacebark.ntu.edu.au>:
personal <Brian Salter-Duke>
local-part <b_duke> domain <lacebark.ntu.edu.au>
])
TESTADDR([Catharine Shyong <shyong@t-iii.com>],[],
[0],
[naddr: 1
1. email <shyong@t-iii.com>:
personal <Catharine Shyong>
local-part <shyong> domain <t-iii.com>
])
TESTADDR([DRUMS-Last-Call:;],[],
[1],
[],
[MU_ERR_EMPTY_ADDRESS
])
TESTADDR([Detailed Revision/Update of Message Standards <drums@cs.utk.edu>],[],
[0],
[naddr: 1
1. email <drums@cs.utk.edu>:
personal <Detailed Revision/Update of Message Standards>
local-part <drums> domain <cs.utk.edu>
])
TESTADDR([Eric Allman <eric+ietf@Sendmail.ORG>],[],
[0],
[naddr: 1
1. email <eric+ietf@Sendmail.ORG>:
personal <Eric Allman>
local-part <eric+ietf> domain <Sendmail.ORG>
])
TESTADDR([Gary <Gary@e-c-s-uk.com>],[],
[0],
[naddr: 1
1. email <Gary@e-c-s-uk.com>:
personal <Gary>
local-part <Gary> domain <e-c-s-uk.com>
])
TESTADDR([IETF working group on revision of mail standards <drums@cs.utk.edu>],[],
[0],
[naddr: 1
1. email <drums@cs.utk.edu>:
personal <IETF working group on revision of mail standards>
local-part <drums> domain <cs.utk.edu>
])
TESTADDR([IETF-Announce:;],[],
[1],
[],
[MU_ERR_EMPTY_ADDRESS
])
TESTADDR([IETF-Announce:;, drums@cs.utk.edu],[],
[0],
[naddr: 1
1. email <drums@cs.utk.edu>:
local-part <drums> domain <cs.utk.edu>
])
TESTADDR([Jean-Baptiste Marchand <Jean-Baptiste.Marchand@epita.fr>],[],
[0],
[naddr: 1
1. email <Jean-Baptiste.Marchand@epita.fr>:
personal <Jean-Baptiste Marchand>
local-part <Jean-Baptiste.Marchand> domain <epita.fr>
])
TESTADDR([Jonathan Rozes <jrozes+969649116.89117462@vinton.com>],[],
[0],
[naddr: 1
1. email <jrozes+969649116.89117462@vinton.com>:
personal <Jonathan Rozes>
local-part <jrozes+969649116.89117462> domain <vinton.com>
])
TESTADDR([Jose "C." Garcia Sogo<jose@jaimedelamo.eu.org>],[],
[0],
[naddr: 1
1. email <jose@jaimedelamo.eu.org>:
personal <Jose C. Garcia Sogo>
local-part <jose> domain <jaimedelamo.eu.org>
])
dnl FIXME
m4_if([
TESTADDR([Marco d'Itri <md@Linux.IT>,[],
[0],
1. email <md@Linux.IT>:
personal <Marco d'Itri>
local-part <md> domain <Linux.IT>
])
])
TESTADDR([No_Reply-To@mapquest.com],[],
[0],
[naddr: 1
1. email <No_Reply-To@mapquest.com>:
local-part <No_Reply-To> domain <mapquest.com>
])
TESTADDR([OSULLIE@rte.ie, skidswam@hotmail.com, boot],[],
[0],
[naddr: 3
1. email <OSULLIE@rte.ie>:
local-part <OSULLIE> domain <rte.ie>
2. email <skidswam@hotmail.com>:
local-part <skidswam> domain <hotmail.com>
3. email <boot@localhost>:
local-part <boot> domain <localhost>
])
TESTADDR([Paul Hoffman / IMC <phoffman@imc.org>],[],
[0],
[naddr: 1
1. email <phoffman@imc.org>:
personal <Paul Hoffman / IMC>
local-part <phoffman> domain <imc.org>
])
TESTADDR([Sam],[],
[0],
[naddr: 1
1. email <Sam@localhost>:
local-part <Sam> domain <localhost>
])
TESTADDR([Sam Roberts <sam@cogent.ca>],[],
[0],
[naddr: 1
1. email <sam@cogent.ca>:
personal <Sam Roberts>
local-part <sam> domain <cogent.ca>
])
TESTADDR([Sam_Roberts/Certicom%Certicom@certicom.com],[],
[0],
[naddr: 1
1. email <Sam_Roberts/Certicom%Certicom@certicom.com>:
local-part <Sam_Roberts/Certicom%Certicom> domain <certicom.com>
])
TESTADDR([Thomas Roessler <roessler@does-not-exist.org>, 490@bugs.guug.de],[],
[0],
[naddr: 2
1. email <roessler@does-not-exist.org>:
personal <Thomas Roessler>
local-part <roessler> domain <does-not-exist.org>
2. email <490@bugs.guug.de>:
local-part <490> domain <bugs.guug.de>
])
TESTADDR([Thomas Roessler <roessler@does-not-exist.org>, g10@gnupg.org],[],
[0],
[naddr: 2
1. email <roessler@does-not-exist.org>:
personal <Thomas Roessler>
local-part <roessler> domain <does-not-exist.org>
2. email <g10@gnupg.org>:
local-part <g10> domain <gnupg.org>
])
TESTADDR([ddickey@ip-12-22-50-150.hqglobal.net],[],
[0],
[naddr: 1
1. email <ddickey@ip-12-22-50-150.hqglobal.net>:
local-part <ddickey> domain <ip-12-22-50-150.hqglobal.net>
])
TESTADDR([ktb <x.y.f@home.com>],[],
[0],
[naddr: 1
1. email <x.y.f@home.com>:
personal <ktb>
local-part <x.y.f> domain <home.com>
])
dnl FIXME
m4_if([
TESTADDR([mcaustin@eudoramail.com, aposner@usaid.gov, Kieran.O'Leary@anpost.ie],[],
[0],
[naddr: 3
1. email <mcaustin@eudoramail.com>:
local-part <mcaustin> domain <eudoramail.com>
2. email <aposner@usaid.gov>:
local-part <aposner> domain <usaid.gov>
3. email <Kieran.O'Leary@anpost.ie>:
local-part <Kieran.O'Leary> domain <anpost.ie>
])
])
TESTADDR([rfunk@wks.uts.ohio-state.eduofflinemailer-bounce@dikke.penguin.nl],[],
[1],
[],
[MU_ERR_BAD_822_FORMAT
])
TESTADDR([root],[],
[0],
[naddr: 1
1. email <root@localhost>:
local-part <root> domain <localhost>
])
dnl FIXME srr <sam@localhost>=> error MU_ERR_BAD_822_FORMAT
TESTADDR([whom it may concern: ;;whom.it.may.concern: ;],[],
[1],
[],
[MU_ERR_BAD_822_FORMAT
])
TESTADDR([whom it may concern: mutt-dev@mutt.org, mutt-users@mutt.org;],[],
[0],
[naddr: 2
1. email <mutt-dev@mutt.org>:
local-part <mutt-dev> domain <mutt.org>
2. email <mutt-users@mutt.org>:
local-part <mutt-users> domain <mutt.org>
])
TESTADDR([Sergey V. Poznyakoff <gray@gnu.org>],[],
[0],
[naddr: 1
1. email <gray@gnu.org>:
personal <Sergey V. Poznyakoff>
local-part <gray> domain <gnu.org>
])
TESTADDR([P. D. Q. Bach <bach@somewhere.org>],[],
[0],
[naddr: 1
1. email <bach@somewhere.org>:
personal <P. D. Q. Bach>
local-part <bach> domain <somewhere.org>
])
TESTADDR(["A bad quote\" <devnull@localhost>],[],
[1],
[],
[MU_ERR_BAD_822_FORMAT
])
# 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.
dnl ------------------------------------------------------------
dnl TESTARGS([NAME], [KW = `'], [INPUT], [STDOUT = `'],
dnl [STDERR = `'], [RUN-IF-FAIL], [RUN-IF-PASS])
dnl
m4_define([TESTARGS],[
AT_SETUP([Argcv: $1])
AT_KEYWORDS([argcv $2])
AT_CHECK([
AT_DATA([input],[$3
])
argcv < input],[0],m4_shift(m4_shift(m4_shift($@))))
AT_CLEANUP
])
dnl ------------------------------------------------------------
TESTARGS([simple input],[],
[1 2 3],
[3: 1 2 3
])
TESTARGS([quoted space],[],
[quoted\ space],
[1: "quoted space"
])
TESTARGS([tab character],[],
[a "tab character"],
[2: a tab\tcharacter
])
TESTARGS([octal and hex escapes],[],
[\157\143\164\141\154\40and\x20\x68\x65\x78],
[1: "octal and hex"
])
TESTARGS([octal and hex escapes 2],[],
[\157\143\164\141\154\40 and \x20\x68\x65\x78],
[3: "octal " and " hex"
])
TESTARGS([escape representation],[],
[A\x3-\48\39],
[1: A\003-\0048\0039
])
TESTARG([8-bit input],[],
[×ÅÒÈÎÑÑ ÐÏÌÏ×ÉÎÁ ÔÁÂÌÉÃÙ],
[3: \327\305\322\310\316\321\321 \320\317\314\317\327\311\316\301 \324\301\302\314\311\303\331])
TESTARG([misquoted input],[],
[messed up'quotations ' in "a single'" "command" lin"e],
[6: messed "upquotations " in "a single'" command "lin\"e"
])
TESTARG([unbalanced quote],[],
['unbalanced "quote],
[2: 'unbalanced "\"quote"
])
TESTARG([unbalanced quote 2],[],
[unbalanced "quote],
[2: unbalanced "\"quote"
])
TESTARG([unbalanced quote 3],[],
["],
[1: "\""
])
# @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@/frm:$top_srcdir:$srcdir:$PATH
top_srcdir=@abs_top_srcdir@
top_builddir=@abs_top_builddir@
\ No newline at end of file
# 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.
AT_SETUP([base64 decoding (read)])
AT_KEYWORDS([base64 base64d base64dr decode])
AT_CHECK([
cp $top_srcdir/libmailutils/tests/Encode expout
fltst base64 decode read linelen=0 < $top_srcdir/libmailutils/tests/Decode],
[0],
[expout])
AT_CLEANUP
AT_SETUP([base64 decoding (write)])
AT_KEYWORDS([base64 base64d base64dw decode])
AT_CHECK([
cp $top_srcdir/libmailutils/tests/Encode expout
fltst base64 decode write linelen=0 < $top_srcdir/libmailutils/tests/Decode],
[0],
[expout])
AT_CLEANUP
# 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.
AT_SETUP([base64 encoding (read)])
AT_KEYWORDS([base64 base64e base64er encode])
AT_CHECK([
cp $top_srcdir/libmailutils/tests/Decode expout
fltst base64 encode read nl < $top_srcdir/libmailutils/tests/Encode],
[0],
[expout])
AT_CLEANUP
AT_SETUP([base64 encoding (write)])
AT_KEYWORDS([base64 base64e base64ew encode])
AT_CHECK([
cp $top_srcdir/libmailutils/tests/Decode expout
fltst base64 encode write nl < $top_srcdir/libmailutils/tests/Encode],
[0],
[expout])
AT_CLEANUP
\ No newline at end of file
# 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.
dnl ------------------------------------------------------------
dnl TESTDEC2047([NAME], [KW = `'], [INPUT], [STDOUT = `'],
dnl [STDERR = `'], [RUN-IF-FAIL], [RUN-IF-PASS])
dnl
m4_define([TESTDEC2047],[
AT_SETUP([Decode 2047: m4_if([$1],[],[$3],[$1])])
AT_KEYWORDS([decode2047 decode $2])
AT_CHECK([
AT_DATA([input],[$3
])
decode2047 -p < input],[0],m4_shift(m4_shift(m4_shift($@))))
AT_CLEANUP
])
dnl ------------------------------------------------------------
TESTDEC2047([],[decode01],
[=?US-ASCII?Q?Keith_Moore?= <moore@cs.utk.edu>],
[Keith Moore <moore@cs.utk.edu>
])
TESTDEC2047([],[decode02],
[=?ISO-8859-1?Q?Keld_J=F8rn_Simonsen?= <keld@dkuug.dk>],
[Keld J\370rn Simonsen <keld@dkuug.dk>
])
TESTDEC2047([],[decode03],
[=?ISO-8859-1?Q?Andr=E9?= Pirard <PIRARD@vm1.ulg.ac.be>],
[Andr\351 Pirard <PIRARD@vm1.ulg.ac.be>
])
TESTDEC2047([],[decode04],
[=?ISO-8859-1?B?SWYgeW91IGNhbiByZWFkIHRoaXMgeW8=?= ... =?ISO-8859-2?B?dSB1bmRlcnN0YW5kIHRoZSBleGFtcGxlLg==?=],
[If you can read this yo ... u understand the example.
])
# Malformed input string: lacks trailing =. MU 0.6.90 hanged on it.
TESTDEC2047([malformed input],[decode05],
[=?koi8-r?B?RndkOiDSxcfJ09TSwcPJ0SDEz83FzsE?=],
[Fwd: \322\305\307\311\323\324\322\301\303\311\321 \304\317\315\305
])
......@@ -71,8 +71,9 @@ main (int argc, char *argv[])
if (len > 0 && buf[len - 1] == '\n')
buf[len - 1] = 0;
rc = mu_rfc2047_decode (charset, buf, &p);
printf ("%s=> %s\n", buf, mu_strerror (rc));
if (p)
if (rc)
fprintf (stderr, "%s", mu_strerror (rc));
else if (p)
print (p, printable);
putchar ('\n');
free (p);
......
# 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.
AT_SETUP([encode2047])
AT_KEYWORDS([encode])
AT_CHECK([
AT_DATA(input,[dnl
\\345\326\305\304\316\305\327\316\331\312\040\317\324\336\305\324
])
encode2047 -c koi8-r -eB -o < input],
[0],
[=?koi8-r?B?5dbFxM7F187ZyiDP1N7F1A==?=
])
AT_CLEANUP
......@@ -197,8 +197,9 @@ main (int argc, char *argv[])
decode_octal (cmd);
rc = mu_rfc2047_encode (charset, encoding, cmd, &p);
printf ("%s=> %s\n", buf, mu_strerror (rc));
if (p)
if (rc)
fprintf (stderr, "%s", mu_strerror (rc));
else if (p)
printf ("%s\n", p);
free (p);
}
......
/* GNU Mailutils -- a suite of utilities for electronic mail
Copyright (C) 1999, 2000, 2001, 2002, 2005, 2007, 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.
GNU Mailutils 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, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02110-1301 USA */
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <unistd.h>
#include <stdio.h>
#include <assert.h>
#include <ctype.h>
#include <string.h>
#include <mailutils/mailutils.h>
#define ISPRINT(c) ((c)>=' '&&(c)<127)
int verbose = 0;
int printable = 0;
static void
c_copy (mu_stream_t out, mu_stream_t in)
{
if (printable)
{
char c;
size_t size;
while (mu_stream_read (in, &c, 1, &size) == 0 && size > 0)
{
int rc;
if (printable && !ISPRINT (c))
{
char outbuf[24];
sprintf (outbuf, "\\%03o", (unsigned char) c);
rc = mu_stream_write (out, outbuf, strlen (outbuf), NULL);
}
else
rc = mu_stream_write (out, &c, 1, NULL);
}
}
else
MU_ASSERT (mu_stream_copy (out, in, 0, NULL));
if (verbose)
fprintf (stderr, "\ntotal: %lu/%lu bytes\n",
(unsigned long) mu_stream_bytes_in (in),
(unsigned long) mu_stream_bytes_out (out));
}
/* Set the maximum line length for the filter NAME to LENGTH.
FIXME: This is a kludge. Perhaps API should provide a function
for that. */
static void
reset_line_length (const char *name, size_t length)
{
mu_list_t list;
int status;
mu_filter_record_t frec;
mu_filter_get_list (&list);
status = mu_list_locate (list, (void*)name, (void**)&frec);
if (status == 0)
frec->max_line_length = length;
/* don't bail out, leave that to mu_filter_create */
}
void
usage (const char *diag)
{
FILE *fp;
if (diag)
{
fp = stderr;
fprintf (fp, "%s\n", diag);
}
else
fp = stdout;
fprintf (fp, "%s",
"usage: fltst FILTER {encode|decode} {read|write} [shift=N] [linelen=N] [verbose] [printable] [nl]\n");
exit (diag ? 1 : 0);
}
int
main (int argc, char * argv [])
{
mu_stream_t in, out, flt;
int i;
int mode = MU_FILTER_ENCODE;
int flags = MU_STREAM_READ;
char *fltname;
mu_off_t shift = 0;
size_t line_length;
int line_length_option = 0;
int newline_option = 0;
if (argc == 1)
usage (NULL);
if (argc < 3)
usage ("not enough arguments");
fltname = argv[1];
if (strcmp (argv[2], "encode") == 0)
mode = MU_FILTER_ENCODE;
else if (strcmp (argv[2], "decode") == 0)
mode = MU_FILTER_DECODE;
else
usage ("2nd arg is wrong");
if (strcmp (argv[3], "read") == 0)
flags = MU_STREAM_READ;
else if (strcmp (argv[3], "write") == 0)
flags = MU_STREAM_WRITE;
else
usage ("3rd arg is wrong");
for (i = 4; i < argc; i++)
{
if (strncmp (argv[i], "shift=", 6) == 0)
shift = strtoul (argv[i] + 6, NULL, 0);
else if (strncmp (argv[i], "linelen=", 8) == 0)
{
line_length = strtoul (argv[i] + 8, NULL, 10);
line_length_option = 1;
}
else if (strcmp (argv[i], "verbose") == 0)
verbose++;
else if (strcmp (argv[i], "printable") == 0)
printable++;
else if (strcmp (argv[i], "nl") == 0)
newline_option++;
else
usage ("wrong option");
}
MU_ASSERT (mu_stdio_stream_create (&in, MU_STDIN_FD, 0));
MU_ASSERT (mu_stream_open (in));
MU_ASSERT (mu_stdio_stream_create (&out, MU_STDOUT_FD, 0));
MU_ASSERT (mu_stream_open (out));
if (line_length_option)
reset_line_length (fltname, line_length);
if (flags == MU_STREAM_READ)
{
MU_ASSERT (mu_filter_create (&flt, in, fltname, mode,
MU_STREAM_READ|MU_STREAM_SEEK|
MU_STREAM_AUTOCLOSE));
if (shift)
MU_ASSERT (mu_stream_seek (flt, shift, MU_SEEK_SET, NULL));
c_copy (out, flt);
}
else
{
MU_ASSERT (mu_filter_create (&flt, out, fltname, mode,
MU_STREAM_WRITE));
if (shift)
MU_ASSERT (mu_stream_seek (in, shift, MU_SEEK_SET, NULL));
c_copy (flt, in);
mu_stream_close (in);
mu_stream_destroy (&in);
}
mu_stream_close (flt);
mu_stream_destroy (&flt);
if (newline_option)
mu_stream_write (out, "\n", 1, NULL);
mu_stream_close (out);
mu_stream_destroy (&out);
return 0;
}
# 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.
dnl ------------------------------------------------------------
dnl MAILCAP([NAME], [KW = `'], [INPUT], [STDOUT = `'],
dnl [STDERR = `'], [RUN-IF-FAIL], [RUN-IF-PASS])
dnl
m4_define([MAILCAP],[
AT_SETUP([Mailcap: [$1]])
AT_KEYWORDS([mailcap $2])
AT_CHECK([
AT_DATA([input],[$3
])
mailcap input],[0],m4_shift(m4_shift(m4_shift($@))))
AT_CLEANUP
])
dnl ------------------------------------------------------------
MAILCAP([1],[mailcap01],
[text/plain; less '%s'; needsterminal],
[[entry[1]
typefield: text/plain
view-command: less '%s'
fields[1]: needsterminal
]])
MAILCAP([2],[mailcap02],
[text/html; gnome-help-browser '%s'; nametemplate=%s.html; test=test -n "$DISPLAY"],
[[entry[1]
typefield: text/html
view-command: gnome-help-browser '%s'
fields[1]: nametemplate=%s.html
fields[2]: test=test -n "$DISPLAY"
]])
MAILCAP([3],[mailcap03],
[application/x-troff-man; /usr/bin/nroff -mandoc -Tlatin1; \
copiousoutput; print=/usr/bin/nroff -mandoc -Tlatin1 | print text/plain:-
],
[[entry[1]
typefield: application/x-troff-man
view-command: /usr/bin/nroff -mandoc -Tlatin1
fields[1]: copiousoutput
fields[2]: print=/usr/bin/nroff -mandoc -Tlatin1 | print text/plain:-
]])
MAILCAP([4],[mailcap04],
[text/plain; shownonascii iso-8859-1 '%s'; description="Plain ASCII Text"; \
test=test "$(echo %{charset} | tr "A-Z" "a-z")" = iso-8859-1 -a "$DISPLAY" != ""],
[[entry[1]
typefield: text/plain
view-command: shownonascii iso-8859-1 '%s'
fields[1]: description="Plain ASCII Text"
fields[2]: test=test "$(echo %{charset} | tr "A-Z" "a-z")" = iso-8859-1 -a "$DISPLAY" != ""
]])
MAILCAP([5],[mailcap05],
[text/richtext; shownonascii iso-8859-1 -e richtext -p '%s'; \
description="Richtext"; copiousoutput; \
test=test "$(echo %{charset} | tr "A-Z" "a-z")" = iso-8859-1 -a "$DISPLAY" != ""],
[[entry[1]
typefield: text/richtext
view-command: shownonascii iso-8859-1 -e richtext -p '%s'
fields[1]: description="Richtext"
fields[2]: copiousoutput
fields[3]: test=test "$(echo %{charset} | tr "A-Z" "a-z")" = iso-8859-1 -a "$DISPLAY" != ""
]])
MAILCAP([6],[mailcap06],
[text/enriched; shownonascii iso-8859-1 -e richtext -e -p '%s'; \
description="Enriched Text"; \
copiousoutput; \
test=test "$(echo %{charset} | tr "A-Z" "a-z")" = iso-8859-1 -a "$DISPLAY" != ""],
[[entry[1]
typefield: text/enriched
view-command: shownonascii iso-8859-1 -e richtext -e -p '%s'
fields[1]: description="Enriched Text"
fields[2]: copiousoutput
fields[3]: test=test "$(echo %{charset} | tr "A-Z" "a-z")" = iso-8859-1 -a "$DISPLAY" != ""
]])
MAILCAP([7],[mailcap07],
[message/partial; showpartial '%s' %{id} %{number} %{total}; description="An incomplete message"],
[[entry[1]
typefield: message/partial
view-command: showpartial '%s' %{id} %{number} %{total}
fields[1]: description="An incomplete message"
]])
MAILCAP([8],[mailcap08],
[message/external-body; showexternal '%s' %{access-type} %{name} %{site} %{directory} %{mode} %{server}; needsterminal; description="A reference to data stored in an external location"; composetyped="extcompose '%s"'],
[[entry[1]
typefield: message/external-body
view-command: showexternal '%s' %{access-type} %{name} %{site} %{directory} %{mode} %{server}
fields[1]: needsterminal
fields[2]: description="A reference to data stored in an external location"
fields[3]: composetyped="extcompose '%s"'
]])
MAILCAP([9],[mailcap09],
[application/x-dvi; /usr/bin/xdvi '%s'; test=test -n "$DISPLAY"; description=TeX DVI file; nametemplate=%s.dvi],
[[entry[1]
typefield: application/x-dvi
view-command: /usr/bin/xdvi '%s'
fields[1]: test=test -n "$DISPLAY"
fields[2]: description=TeX DVI file
fields[3]: nametemplate=%s.dvi
]])
MAILCAP([10],[mailcap10],
[text/plain; more '%s'; needsterminal],
[[entry[1]
typefield: text/plain
view-command: more '%s'
fields[1]: needsterminal
]])
MAILCAP([11],[mailcap11],
[text/html; /usr/bin/links '%s'; needsterminal; description=HTML Text; nametemplate=%s.html],
[[entry[1]
typefield: text/html
view-command: /usr/bin/links '%s'
fields[1]: needsterminal
fields[2]: description=HTML Text
fields[3]: nametemplate=%s.html
]])
MAILCAP([12],[mailcap12],
[text/richtext; richtext '%s'; description="Richtext"; copiousoutput],
[[entry[1]
typefield: text/richtext
view-command: richtext '%s'
fields[1]: description="Richtext"
fields[2]: copiousoutput
]])
MAILCAP([13],[mailcap13],
[text/enriched; richtext -e '%s'; description="Enriched Text"; copiousoutput],
[[entry[1]
typefield: text/enriched
view-command: richtext -e '%s'
fields[1]: description="Enriched Text"
fields[2]: copiousoutput
]])
MAILCAP([14],[mailcap14],
[text/html; /usr/bin/w3m -T text/html '%s'; needsterminal; description=HTML Text; nametemplate=%s.html],
[[entry[1]
typefield: text/html
view-command: /usr/bin/w3m -T text/html '%s'
fields[1]: needsterminal
fields[2]: description=HTML Text
fields[3]: nametemplate=%s.html
]])
MAILCAP([15],[mailcap15],
[text/html; /usr/bin/links -dump '%s'; copiousoutput; description=HTML Text; nametemplate=%s.html],
[[entry[1]
typefield: text/html
view-command: /usr/bin/links -dump '%s'
fields[1]: copiousoutput
fields[2]: description=HTML Text
fields[3]: nametemplate=%s.html
]])
MAILCAP([16],[mailcap16],
[text/html; /usr/bin/lynx -force_html '%s'; needsterminal; description=HTML Text; nametemplate=%s.html],
[[entry[1]
typefield: text/html
view-command: /usr/bin/lynx -force_html '%s'
fields[1]: needsterminal
fields[2]: description=HTML Text
fields[3]: nametemplate=%s.html
]])
MAILCAP([17],[mailcap17],
[text/html; /usr/bin/w3m -dump -T text/html '%s'; copiousoutput; description=HTML Text; nametemplate=%s.html],
[[entry[1]
typefield: text/html
view-command: /usr/bin/w3m -dump -T text/html '%s'
fields[1]: copiousoutput
fields[2]: description=HTML Text
fields[3]: nametemplate=%s.html
]])
MAILCAP([18],[mailcap18],
[text/html; /usr/bin/html2text '%s'; copiousoutput; description=HTML Text],
[[entry[1]
typefield: text/html
view-command: /usr/bin/html2text '%s'
fields[1]: copiousoutput
fields[2]: description=HTML Text
]])
MAILCAP([19],[mailcap19],
[text/html; /usr/bin/lynx -dump -force_html '%s'; copiousoutput; description=HTML Text; nametemplate=%s.html],
[[entry[1]
typefield: text/html
view-command: /usr/bin/lynx -dump -force_html '%s'
fields[1]: copiousoutput
fields[2]: description=HTML Text
fields[3]: nametemplate=%s.html
]])
MAILCAP([20],[mailcap20],
[text/*; less '%s'; needsterminal],
[[entry[1]
typefield: text/*
view-command: less '%s'
fields[1]: needsterminal
]])
MAILCAP([21],[mailcap21],
[text/*; more '%s'; needsterminal],
[[entry[1]
typefield: text/*
view-command: more '%s'
fields[1]: needsterminal
]])
MAILCAP([22],[mailcap22],
[application/x-debian-package; /usr/lib/mime/debian-view '%s'; \
needsterminal; description=Debian GNU/Linux Package; \
nametemplate=%s.deb],
[[entry[1]
typefield: application/x-debian-package
view-command: /usr/lib/mime/debian-view '%s'
fields[1]: needsterminal
fields[2]: description=Debian GNU/Linux Package
fields[3]: nametemplate=%s.deb
]])
MAILCAP([23],[mailcap23],
[audio/basic; /usr/lib/mime/playaudio '%s'; description=Basic uLaw Audio; \
nametemplate=%s.au],
[[entry[1]
typefield: audio/basic
view-command: /usr/lib/mime/playaudio '%s'
fields[1]: description=Basic uLaw Audio
fields[2]: nametemplate=%s.au
]])
# This file is part of Mailutils testsuite.
# Copyright (C) 2002, 2007, 2010 Free Software Foundation, Inc.
#
# This program 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 of the License, 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 this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
# 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.
#
# 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
# 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.
AT_SETUP([mime])
# FIXME: Mimetest should probably be fixed to avoid the use of `tr'
# and `sed' here.
AT_CHECK([mimetest -i 0 -p $top_srcdir/testsuite/spool/mbox1 | dnl
tr '\t' ' ' | sed 's/ *$//'],
[0],
[Message: 1
From: Foo Bar <foobar@nonexistent.net>
Subject: Jabberwocky
Number of parts in message - 1
......@@ -100,7 +105,7 @@ With gently smiling jaws!
End
Type of part 2 = application/octet-stream
Message part size - 645/11: 183/5, 462/6
Attachment - saving [msg.21]
Attachment - saving [[msg.21]]
Begin
`You are old, Father William,' the young man said,
`And your hair has become very white;
......@@ -141,7 +146,7 @@ Encapsulated message :
Begin
Type of part 1 = application/octet-stream
Message part size - 663/12: 184/5, 479/7
Attachment - saving [msg.22]
Attachment - saving [[msg.22]]
Begin
`You are old,' said the youth, `as I mentioned before,
And have grown most uncommonly fat;
......@@ -160,7 +165,7 @@ Encapsulated message :
Begin
Type of part 1 = application/octet-stream
Message part size - 668/12: 185/5, 483/7
Attachment - saving [msg.23]
Attachment - saving [[msg.23]]
Begin
`You are old,' said the youth, `and your jaws are too weak
For anything tougher than suet;
......@@ -175,7 +180,7 @@ Has lasted the rest of my life.'
End
Type of part 2 = application/octet-stream
Message part size - 679/12: 184/5, 495/7
Attachment - saving [msg.24]
Attachment - saving [[msg.24]]
Begin
`You are old,' said the youth, `one would hardly suppose
That your eye was as steady as ever;
......@@ -210,3 +215,6 @@ Begin
End
])
AT_CLEANUP
\ No newline at end of file
......
# 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.
m4_include([testsuite.inc])
AT_INIT
m4_include([address.at])
m4_include([argcv.at])
m4_include([mime.at])
m4_include([url.at])
m4_include([mailcap.at])
m4_include([base64e.at])
m4_include([base64d.at])
m4_include([decode2047.at])
m4_include([encode2047.at])
......@@ -39,7 +39,7 @@
mu_error ("cannot get %s: %s", #field, mu_strerror (status)); \
exit (1); \
} \
printf ("\t" #field " <%s>\n", buf)
printf (#field " <%s>\n", buf)
static void
print_fvpairs (mu_url_t url)
......@@ -55,7 +55,7 @@ print_fvpairs (mu_url_t url)
if (fvc == 0)
return;
for (i = 0; i < fvc; i++)
printf ("\tparam[%lu] <%s>\n", (unsigned long) i, fvp[i]);
printf ("param[%lu] <%s>\n", (unsigned long) i, fvp[i]);
}
static void
......@@ -72,7 +72,7 @@ print_query (mu_url_t url)
if (qargc == 0)
return;
for (i = 0; i < qargc; i++)
printf ("\tquery[%lu] <%s>\n", (unsigned long) i, qargv[i]);
printf ("query[%lu] <%s>\n", (unsigned long) i, qargv[i]);
}
int
......@@ -99,18 +99,16 @@ main ()
}
if ((rc = mu_url_parse (u)) != 0)
{
printf ("%s => FAILED: [%d] %s\n",
str, rc, mu_strerror (rc));
fprintf (stderr, "%s\n", mu_errname (rc));
continue;
}
printf ("%s => SUCCESS\n", str);
GET_AND_PRINT (scheme, u, buf, rc);
GET_AND_PRINT (user, u, buf, rc);
rc = mu_url_get_secret (u, &secret);
if (rc == MU_ERR_NOENT)
printf ("\tpasswd <>\n");
printf ("passwd <>\n");
else if (rc)
{
mu_error ("cannot get %s: %s", "passwd", mu_strerror (rc));
......@@ -118,7 +116,7 @@ main ()
}
else
{
printf ("\tpasswd <%s>\n", mu_secret_password (secret));
printf ("passwd <%s>\n", mu_secret_password (secret));
mu_secret_password_unref (secret);
}
......@@ -131,7 +129,7 @@ main ()
mu_error ("cannot get %s: %s", "port", mu_strerror (rc));
exit (1);
}
printf ("\tport %ld\n", port);
printf ("port %ld\n", port);
GET_AND_PRINT (path, u, buf, rc);
print_fvpairs (u);
......
# 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.
dnl ------------------------------------------------------------
dnl TESTURL([NAME], [KW = `'], [INPUT], [STDOUT = `'],
dnl [STDERR = `'], [RUN-IF-FAIL], [RUN-IF-PASS])
dnl
m4_define([TESTURL],[
AT_SETUP([URL: m4_if([$1],[],[$3],[$1])])
AT_KEYWORDS([url $2])
AT_CHECK([
AT_DATA([input],[$3
])
url-parse < input],[0],m4_shift(m4_shift(m4_shift($@))))
AT_CLEANUP
])
dnl ------------------------------------------------------------
TESTURL([],[],
[scheme:],
[scheme <scheme>
user <>
passwd <>
auth <>
host <>
port 0
path <>
])
TESTURL([],[],
[scheme:/absolute/path],
[scheme <scheme>
user <>
passwd <>
auth <>
host <>
port 0
path </absolute/path>
])
TESTURL([],[],
[scheme:relative/path],
[scheme <scheme>
user <>
passwd <>
auth <>
host <>
port 0
path <relative/path>
])
TESTURL([],[],
[scheme:///absolute/path],
[scheme <scheme>
user <>
passwd <>
auth <>
host <>
port 0
path </absolute/path>
])
TESTURL([],[],
[scheme://%75%73%65%72:%70%61%73%73@%68%6f%73%74],
[scheme <scheme>
user <user>
passwd <pass>
auth <>
host <host>
port 0
path <>
])
TESTURL([],[],
[ftp://user:pass@host//a/path],
[scheme <ftp>
user <user>
passwd <pass>
auth <>
host <host>
port 0
path </a/path>
])
TESTURL([],[],
[ftp://:pass@host//a/path],
[scheme <ftp>
user <>
passwd <pass>
auth <>
host <host>
port 0
path </a/path>
])
TESTURL([],[],
[ftp://user:@host//a/path],
[scheme <ftp>
user <user>
passwd <>
auth <>
host <host>
port 0
path </a/path>
])
TESTURL([],[],
[ftp://user:pass@//a/path],
[scheme <ftp>
user <user>
passwd <pass>
auth <>
host <>
port 0
path </a/path>
])
TESTURL([],[],
[ftp://user:@//a/path],
[scheme <ftp>
user <user>
passwd <>
auth <>
host <>
port 0
path </a/path>
])
TESTURL([],[],
[ftp://:@host//a/path],
[scheme <ftp>
user <>
passwd <>
auth <>
host <host>
port 0
path </a/path>
])
TESTURL([],[],
[ftp://:pass@//a/path],
[scheme <ftp>
user <>
passwd <pass>
auth <>
host <>
port 0
path </a/path>
])
TESTURL([],[],
[ftp://:@//a/path],
[scheme <ftp>
user <>
passwd <>
auth <>
host <>
port 0
path </a/path>
])
TESTURL([],[],
[ftp://://a/path],
[scheme <ftp>
user <>
passwd <>
auth <>
host <>
port 0
path </a/path>
])
TESTURL([],[],
[ftp://@//a/path],
[scheme <ftp>
user <>
passwd <>
auth <>
host <>
port 0
path </a/path>
])
TESTURL([],[],
[ftp:/a/path],
[scheme <ftp>
user <>
passwd <>
auth <>
host <>
port 0
path </a/path>
])
TESTURL([],[],
[ftp://user:pass@host/a/path],
[scheme <ftp>
user <user>
passwd <pass>
auth <>
host <host>
port 0
path <a/path>
])
TESTURL([],[],
[ftp://:pass@host/a/path],
[scheme <ftp>
user <>
passwd <pass>
auth <>
host <host>
port 0
path <a/path>
])
TESTURL([],[],
[ftp://user:@host/a/path],
[scheme <ftp>
user <user>
passwd <>
auth <>
host <host>
port 0
path <a/path>
])
TESTURL([],[],
[ftp://user:pass@/a/path],
[scheme <ftp>
user <user>
passwd <pass>
auth <>
host <>
port 0
path <a/path>
])
TESTURL([],[],
[ftp://user:@/a/path],
[scheme <ftp>
user <user>
passwd <>
auth <>
host <>
port 0
path <a/path>
])
TESTURL([],[],
[ftp://:@host/a/path],
[scheme <ftp>
user <>
passwd <>
auth <>
host <host>
port 0
path <a/path>
])
TESTURL([],[],
[ftp://:pass@/a/path],
[scheme <ftp>
user <>
passwd <pass>
auth <>
host <>
port 0
path <a/path>
])
TESTURL([],[],
[ftp://:@/a/path],
[scheme <ftp>
user <>
passwd <>
auth <>
host <>
port 0
path <a/path>
])
TESTURL([],[],
[ftp://:/a/path],
[scheme <ftp>
user <>
passwd <>
auth <>
host <>
port 0
path <a/path>
])
TESTURL([],[],
[ftp://@/a/path],
[scheme <ftp>
user <>
passwd <>
auth <>
host <>
port 0
path <a/path>
])
TESTURL([],[],
[ftp:///a/path],
[scheme <ftp>
user <>
passwd <>
auth <>
host <>
port 0
path </a/path>
])
TESTURL([],[],
[pop://pop.example.net],
[scheme <pop>
user <>
passwd <>
auth <>
host <pop.example.net>
port 0
path <>
])
TESTURL([],[],
[pop://user@pop.example.net],
[scheme <pop>
user <user>
passwd <>
auth <>
host <pop.example.net>
port 0
path <>
])
TESTURL([],[],
[pop://user:passwd@pop.example.net],
[scheme <pop>
user <user>
passwd <passwd>
auth <>
host <pop.example.net>
port 0
path <>
])
TESTURL([],[],
[pop://user;auth=*@pop.example.net],
[scheme <pop>
user <user>
passwd <>
auth <*>
host <pop.example.net>
port 0
path <>
])
TESTURL([],[],
[pop://pop.example.net:111],
[scheme <pop>
user <>
passwd <>
auth <>
host <pop.example.net>
port 111
path <>
])
TESTURL([],[],
[pop://user@pop.example.net:111],
[scheme <pop>
user <user>
passwd <>
auth <>
host <pop.example.net>
port 111
path <>
])
TESTURL([],[],
[pop://user:passwd@pop.example.net:111],
[scheme <pop>
user <user>
passwd <passwd>
auth <>
host <pop.example.net>
port 111
path <>
])
TESTURL([],[],
[pop://user;auth=*@pop.example.net:111],
[scheme <pop>
user <user>
passwd <>
auth <*>
host <pop.example.net>
port 111
path <>
])
TESTURL([],[],
[imap://imap.example.net],
[scheme <imap>
user <>
passwd <>
auth <>
host <imap.example.net>
port 0
path <>
])
TESTURL([],[],
[imap://user@imap.example.net],
[scheme <imap>
user <user>
passwd <>
auth <>
host <imap.example.net>
port 0
path <>
])
TESTURL([],[],
[imap://user:passwd@imap.example.net],
[scheme <imap>
user <user>
passwd <passwd>
auth <>
host <imap.example.net>
port 0
path <>
])
TESTURL([],[],
[imap://user;auth=*@imap.example.net],
[scheme <imap>
user <user>
passwd <>
auth <*>
host <imap.example.net>
port 0
path <>
])
TESTURL([],[],
[imap://imap.example.net:111],
[scheme <imap>
user <>
passwd <>
auth <>
host <imap.example.net>
port 111
path <>
])
TESTURL([],[],
[imap://user@imap.example.net:111],
[scheme <imap>
user <user>
passwd <>
auth <>
host <imap.example.net>
port 111
path <>
])
TESTURL([],[],
[imap://user:passwd@imap.example.net:111],
[scheme <imap>
user <user>
passwd <passwd>
auth <>
host <imap.example.net>
port 111
path <>
])
TESTURL([],[],
[imap://user;auth=*@imap.example.net:111],
[scheme <imap>
user <user>
passwd <>
auth <*>
host <imap.example.net>
port 111
path <>
])
TESTURL([],[],
[imap://imap.example.net/mbox],
[scheme <imap>
user <>
passwd <>
auth <>
host <imap.example.net>
port 0
path <mbox>
])
TESTURL([],[],
[imap://user@imap.example.net/mbox],
[scheme <imap>
user <user>
passwd <>
auth <>
host <imap.example.net>
port 0
path <mbox>
])
TESTURL([],[],
[imap://user:passwd@imap.example.net/mbox],
[scheme <imap>
user <user>
passwd <passwd>
auth <>
host <imap.example.net>
port 0
path <mbox>
])
TESTURL([],[],
[imap://user;auth=*@imap.example.net/mbox],
[scheme <imap>
user <user>
passwd <>
auth <*>
host <imap.example.net>
port 0
path <mbox>
])
TESTURL([],[],
[imap://imap.example.net:111/mbox],
[scheme <imap>
user <>
passwd <>
auth <>
host <imap.example.net>
port 111
path <mbox>
])
TESTURL([],[],
[imap://user@imap.example.net:111/mbox],
[scheme <imap>
user <user>
passwd <>
auth <>
host <imap.example.net>
port 111
path <mbox>
])
TESTURL([],[],
[imap://user:passwd@imap.example.net:111/mbox],
[scheme <imap>
user <user>
passwd <passwd>
auth <>
host <imap.example.net>
port 111
path <mbox>
])
TESTURL([],[],
[imap://user;auth=*@imap.example.net:111/mbox],
[scheme <imap>
user <user>
passwd <>
auth <*>
host <imap.example.net>
port 111
path <mbox>
])
TESTURL([],[],
[imap://imap.example.net/mbox/user@host],
[scheme <imap>
user <imap.example.net/mbox/user>
passwd <>
auth <>
host <host>
port 0
path <>
])
TESTURL([],[],
[imap://user@imap.example.net/mbox/user@host],
[scheme <imap>
user <user>
passwd <>
auth <>
host <imap.example.net>
port 0
path <mbox/user@host>
])
TESTURL([],[],
[imap://user:passwd@imap.example.net/mbox/user@host],
[scheme <imap>
user <user>
passwd <passwd>
auth <>
host <imap.example.net>
port 0
path <mbox/user@host>
])
TESTURL([],[],
[imap://user;auth=*@imap.example.net/mbox/user@host],
[scheme <imap>
user <user>
passwd <>
auth <*>
host <imap.example.net>
port 0
path <mbox/user@host>
])
TESTURL([],[],
[imap://imap.example.net:111/mbox/user@host],
[scheme <imap>
user <imap.example.net>
passwd <111/mbox/user>
auth <>
host <host>
port 0
path <>
])
TESTURL([],[],
[imap://user@imap.example.net:111/mbox/user@host],
[scheme <imap>
user <user>
passwd <>
auth <>
host <imap.example.net>
port 111
path <mbox/user@host>
])
TESTURL([],[],
[imap://user:passwd@imap.example.net:111/mbox/user@host],
[scheme <imap>
user <user>
passwd <passwd>
auth <>
host <imap.example.net>
port 111
path <mbox/user@host>
])
TESTURL([],[],
[imap://user;auth=*@imap.example.net:111/mbox/user@host],
[scheme <imap>
user <user>
passwd <>
auth <*>
host <imap.example.net>
port 111
path <mbox/user@host>
])
TESTURL([],[],
[ftp://ftp.example.org/mbox/user%40host],
[scheme <ftp>
user <>
passwd <>
auth <>
host <ftp.example.org>
port 0
path <mbox/user@host>
])
TESTURL([],[],
[ftp://ftp.example.org:111/mbox/user%40host],
[scheme <ftp>
user <>
passwd <>
auth <>
host <ftp.example.org>
port 111
path <mbox/user@host>
])
TESTURL([],[],
[ftp://ftp.example.org:111/mbox/user%40host;type=pass],
[[scheme <ftp>
user <>
passwd <>
auth <>
host <ftp.example.org>
port 111
path <mbox/user@host>
param[0] <type=pass>
]])
TESTURL([],[],
[mbox:/var/spool/mail;type=index;param=2;user=gray],
[[scheme <mbox>
user <>
passwd <>
auth <>
host <>
port 0
path </var/spool/mail>
param[0] <type=index>
param[1] <param=2>
param[2] <user=gray>
]])
TESTURL([],[],
[mbox:///var/spool/mail;type=index;param=2;user=gray],
[[scheme <mbox>
user <>
passwd <>
auth <>
host <>
port 0
path </var/spool/mail>
param[0] <type=index>
param[1] <param=2>
param[2] <user=gray>
]])
TESTURL([],[],
[http://gnu.org.ua/home/gray?prog&arg1&arg2],
[[scheme <http>
user <>
passwd <>
auth <>
host <gnu.org.ua>
port 0
path <home/gray>
query[0] <prog>
query[1] <arg1>
query[2] <arg2>
]])
TESTURL([],[],
[http://gnu.org.ua/home/gray;foo=bar;baz=qux?prog&arg%201&arg%202],
[[scheme <http>
user <>
passwd <>
auth <>
host <gnu.org.ua>
port 0
path <home/gray>
param[0] <foo=bar>
param[1] <baz=qux>
query[0] <prog>
query[1] <arg 1>
query[2] <arg 2>
]])
Makefile
Makefile.in
*.log
*.sum
site.exp
remote.exp
data
# This file is part of Mailutils testsuite.
# Copyright (C) 2002, 2007, 2010 Free Software Foundation, Inc.
#
# This program 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 of the License, 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 this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
test; abc <sascha@silbe.org>=> error MU_ERR_BAD_822_FORMAT
Sam <@[matrix (smtp)], @[nexus: \[node 12\]]:sroberts@[10].[1]> ;=> error MU_ERR_BAD_822_FORMAT
a@b,z@y=> pcount 2
1 email <a@b>
local-part <a> domain <b>
2 email <z@y>
local-part <z> domain <y>
,a@b,z@y=> pcount 2
1 email <a@b>
local-part <a> domain <b>
2 email <z@y>
local-part <z> domain <y>
a@b,z@y,=> pcount 2
1 email <a@b>
local-part <a> domain <b>
2 email <z@y>
local-part <z> domain <y>
,a@b,z@y,=> pcount 2
1 email <a@b>
local-part <a> domain <b>
2 email <z@y>
local-part <z> domain <y>
a@b,,z@y=> pcount 2
1 email <a@b>
local-part <a> domain <b>
2 email <z@y>
local-part <z> domain <y>
a@b,,,z@y=> pcount 2
1 email <a@b>
local-part <a> domain <b>
2 email <z@y>
local-part <z> domain <y>
,,,a@b,,,=> pcount 1
1 email <a@b>
local-part <a> domain <b>
,a@b=> pcount 1
1 email <a@b>
local-part <a> domain <b>
a@b,=> pcount 1
1 email <a@b>
local-part <a> domain <b>
,=> error MU_ERR_EMPTY_ADDRESS
,,=> error MU_ERR_EMPTY_ADDRESS
,,,=> error MU_ERR_EMPTY_ADDRESS
a group: a@b,z@y ;=> pcount 2
1 email <a@b>
local-part <a> domain <b>
2 email <z@y>
local-part <z> domain <y>
a group: ,a@b,z@y ;=> pcount 2
1 email <a@b>
local-part <a> domain <b>
2 email <z@y>
local-part <z> domain <y>
a group: a@b,z@y, ;=> pcount 2
1 email <a@b>
local-part <a> domain <b>
2 email <z@y>
local-part <z> domain <y>
a group: ,a@b,z@y, ;=> pcount 2
1 email <a@b>
local-part <a> domain <b>
2 email <z@y>
local-part <z> domain <y>
a group: a@b,,z@y ;=> pcount 2
1 email <a@b>
local-part <a> domain <b>
2 email <z@y>
local-part <z> domain <y>
a group: a@b,,,z@y ;=> pcount 2
1 email <a@b>
local-part <a> domain <b>
2 email <z@y>
local-part <z> domain <y>
a group: ,,,a@b,,, ;=> pcount 1
1 email <a@b>
local-part <a> domain <b>
a group: ,a@b ;=> pcount 1
1 email <a@b>
local-part <a> domain <b>
a group: a@b, ;=> pcount 1
1 email <a@b>
local-part <a> domain <b>
a group: , ;=> error MU_ERR_EMPTY_ADDRESS
a group: ,, ;=> error MU_ERR_EMPTY_ADDRESS
a group: ,,, ;=> error MU_ERR_EMPTY_ADDRESS
Sam <@[matrix (smtp)], @[nexus: \[node 12\]]:sroberts@[10].[1]> ;=> error MU_ERR_BAD_822_FORMAT
Aliens: Sam <@[matrix (smtp)]: sam@sam>, sroberts@[10].[1];=> pcount 2
1 email <sam@sam>
personal <Sam>
local-part <sam> domain <sam>
route <@[matrix (smtp)]>
2 email <sroberts@[10].[1]>
local-part <sroberts> domain <[10].[1]>
lo@hi, Aliens: Sam <@[matrix (smtp)]: sam@sam>, sroberts@[10].[1];=> pcount 3
1 email <lo@hi>
local-part <lo> domain <hi>
2 email <sam@sam>
personal <Sam>
local-part <sam> domain <sam>
route <@[matrix (smtp)]>
3 email <sroberts@[10].[1]>
local-part <sroberts> domain <[10].[1]>
Aliens: Sam <@[matrix (smtp)]: sam@sam>, sroberts@[10].[1];, hi@lo=> pcount 3
1 email <sam@sam>
personal <Sam>
local-part <sam> domain <sam>
route <@[matrix (smtp)]>
2 email <sroberts@[10].[1]>
local-part <sroberts> domain <[10].[1]>
3 email <hi@lo>
local-part <hi> domain <lo>
lo@hi, Aliens: Sam <@[matrix (smtp)]: sam@sam>, sroberts@[10].[1];, hi@lo=> pcount 4
1 email <lo@hi>
local-part <lo> domain <hi>
2 email <sam@sam>
personal <Sam>
local-part <sam> domain <sam>
route <@[matrix (smtp)]>
3 email <sroberts@[10].[1]>
local-part <sroberts> domain <[10].[1]>
4 email <hi@lo>
local-part <hi> domain <lo>
Sam <@mail2.uniserve.com:sroberts@uniserve.com>=> pcount 1
1 email <sroberts@uniserve.com>
personal <Sam>
local-part <sroberts> domain <uniserve.com>
route <@mail2.uniserve.com>
< (hey) @ (hey, )smtp1.sympatico.ca, mail2.uniserve.com (hoo!):sroberts@uniserve.com>=> error MU_ERR_BAD_822_FORMAT
hw@570.com (Hardware Support Account)=> pcount 1
1 email <hw@570.com>
personal <Hardware Support Account>
local-part <hw> domain <570.com>
list-ietf-wg-apps-drums@faerber.muc.de (=?ISO-8859-1?Q?Claus_F=E4rber?=)=> pcount 1
1 email <list-ietf-wg-apps-drums@faerber.muc.de>
personal <=?ISO-8859-1?Q?Claus_F=E4rber?=>
local-part <list-ietf-wg-apps-drums> domain <faerber.muc.de>
<mutt-dev@mutt.org>(mutt #369), guug-bugs-closed@guug.de (#369)=> pcount 2
1 email <mutt-dev@mutt.org>
local-part <mutt-dev> domain <mutt.org>
2 email <guug-bugs-closed@guug.de>
personal <#369>
local-part <guug-bugs-closed> domain <guug.de>
"'Aernoudt Bottemanne'" <Aernoudt.Bottemanne@Informix.com>=> pcount 1
1 email <Aernoudt.Bottemanne@Informix.com>
personal <'Aernoudt Bottemanne'>
local-part <Aernoudt.Bottemanne> domain <Informix.com>
"'Haag, Ullrich - MBDC'" <Ullrich.Haag@MBDC.com>,=> pcount 1
1 email <Ullrich.Haag@MBDC.com>
personal <'Haag, Ullrich - MBDC'>
local-part <Ullrich.Haag> domain <MBDC.com>
"'Michael C. Ibarra'" <ibarra@hawk.com>, arl@q7.net, Al <arl@q7.net>=> pcount 3
1 email <ibarra@hawk.com>
personal <'Michael C. Ibarra'>
local-part <ibarra> domain <hawk.com>
2 email <arl@q7.net>
local-part <arl> domain <q7.net>
3 email <arl@q7.net>
personal <Al>
local-part <arl> domain <q7.net>
"'Sam Roberts'" <sam@cogent.ca>=> pcount 1
1 email <sam@cogent.ca>
personal <'Sam Roberts'>
local-part <sam> domain <cogent.ca>
"'paul@pitbull-productions.com'" <paul@pitbull-productions.com>,=> pcount 1
1 email <paul@pitbull-productions.com>
personal <'paul@pitbull-productions.com'>
local-part <paul> domain <pitbull-productions.com>
"'sam@cogent.ca'" <sam@cogent.ca>, "'sroberts@uniserve.com'"=> error MU_ERR_BAD_822_FORMAT
"'sroberts\@certicom\.ca'" <sroberts@certicom.ca>=> pcount 1
1 email <sroberts@certicom.ca>
personal <'sroberts@certicom.ca'>
local-part <sroberts> domain <certicom.ca>
"=?iso-8859-1?Q?Juan_Carlos_Marcos_Rodr=EDguez?=" <jcmarcos@datavoice.es>=> pcount 1
1 email <jcmarcos@datavoice.es>
personal <=?iso-8859-1?Q?Juan_Carlos_Marcos_Rodr=EDguez?=>
local-part <jcmarcos> domain <datavoice.es>
"Christian Edward Gruber" <christian.edward.gruber@gmx.net>,=> pcount 1
1 email <christian.edward.gruber@gmx.net>
personal <Christian Edward Gruber>
local-part <christian.edward.gruber> domain <gmx.net>
"D. J. Bernstein" <"djb- "@cr.yp.to>=> pcount 1
1 email <"djb- "@cr.yp.to>
personal <D. J. Bernstein>
local-part <djb- > domain <cr.yp.to>
"D. J. Bernstein" <djb@cr.yp.to>, drums@cs.utk.edu=> pcount 2
1 email <djb@cr.yp.to>
personal <D. J. Bernstein>
local-part <djb> domain <cr.yp.to>
2 email <drums@cs.utk.edu>
local-part <drums> domain <cs.utk.edu>
"Dave Sill <de5-drums" <de5-drums@sws5.ctd.ornl.gov>=> pcount 1
1 email <de5-drums@sws5.ctd.ornl.gov>
personal <Dave Sill <de5-drums>
local-part <de5-drums> domain <sws5.ctd.ornl.gov>
"Dave \(work\) Baerg \(E-mail\)" <Dave.Baerg@SUMMedia.com>=> pcount 1
1 email <Dave.Baerg@SUMMedia.com>
personal <Dave (work) Baerg (E-mail)>
local-part <Dave.Baerg> domain <SUMMedia.com>
"Demian" <damient@wave.home.com>=> pcount 1
1 email <damient@wave.home.com>
personal <Demian>
local-part <damient> domain <wave.home.com>
"Detailed Revision/Update of Message Standards" <drums@cs.utk.edu>=> pcount 1
1 email <drums@cs.utk.edu>
personal <Detailed Revision/Update of Message Standards>
local-part <drums> domain <cs.utk.edu>
"Fred" <fprog@__nowhere__.users.sourceforge.net>=> pcount 1
1 email <fprog@__nowhere__.users.sourceforge.net>
personal <Fred>
local-part <fprog> domain <__nowhere__.users.sourceforge.net>
"Haag, Ullrich - MBDC" <Ullrich.Haag@MBDC.com>=> pcount 1
1 email <Ullrich.Haag@MBDC.com>
personal <Haag, Ullrich - MBDC>
local-part <Ullrich.Haag> domain <MBDC.com>
"Jacob Palme" <jpalme@dsv.su.se>, <drums@cs.utk.edu>=> pcount 2
1 email <jpalme@dsv.su.se>
personal <Jacob Palme>
local-part <jpalme> domain <dsv.su.se>
2 email <drums@cs.utk.edu>
local-part <drums> domain <cs.utk.edu>
"Jakob 'sparky' Kaivo" <jkaivo@elijah.nodomainname.net>=> pcount 1
1 email <jkaivo@elijah.nodomainname.net>
personal <Jakob 'sparky' Kaivo>
local-part <jkaivo> domain <elijah.nodomainname.net>
"Lee R. Copp" <Lee.R.Copp@MichiganScientific.com>=> pcount 1
1 email <Lee.R.Copp@MichiganScientific.com>
personal <Lee R. Copp>
local-part <Lee.R.Copp> domain <MichiganScientific.com>
"Lionel Johnson" <ljohnson**nospam**@sterling1.com>=> pcount 1
1 email <ljohnson**nospam**@sterling1.com>
personal <Lionel Johnson>
local-part <ljohnson**nospam**> domain <sterling1.com>
"Martin \[Keso\] Keseg" <Martin.Keseg@slovakia.sun.com>=> pcount 1
1 email <Martin.Keseg@slovakia.sun.com>
personal <Martin [Keso] Keseg>
local-part <Martin.Keseg> domain <slovakia.sun.com>
#FIXME: there is no way to send } to the remote program...
"]\{ristoph" <news2@kristoph.net>=> pcount 1
1 email <news2@kristoph.net>
personal <]{ristoph>
local-part <news2> domain <kristoph.net>
"fmartens-2000" <fmartens-2000@planet.nl>=> pcount 1
1 email <fmartens-2000@planet.nl>
personal <fmartens-2000>
local-part <fmartens-2000> domain <planet.nl>
"g'o'tz ohnesorge" <gohnesorge@lh-computertechnik.de>=> pcount 1
1 email <gohnesorge@lh-computertechnik.de>
personal <g'o'tz ohnesorge>
local-part <gohnesorge> domain <lh-computertechnik.de>
"gao jie" <jiegi@public.wh.hb.cn>=> pcount 1
1 email <jiegi@public.wh.hb.cn>
personal <gao jie>
local-part <jiegi> domain <public.wh.hb.cn>
"gnupg-devel@gnupg.org" <gnupg-devel%gnupg.org@f48.n48.z2.fidonet.org>=> pcount 1
1 email <gnupg-devel%gnupg.org@f48.n48.z2.fidonet.org>
personal <gnupg-devel@gnupg.org>
local-part <gnupg-devel%gnupg.org> domain <f48.n48.z2.fidonet.org>
"gpg-devel" <gnupg-devel@gnupg.org>=> pcount 1
1 email <gnupg-devel@gnupg.org>
personal <gpg-devel>
local-part <gnupg-devel> domain <gnupg.org>
"jigang" <jigang@jinglun.com.cn>=> pcount 1
1 email <jigang@jinglun.com.cn>
personal <jigang>
local-part <jigang> domain <jinglun.com.cn>
"misc@openbsd.org" <misc@openbsd.org>=> pcount 1
1 email <misc@openbsd.org>
personal <misc@openbsd.org>
local-part <misc> domain <openbsd.org>
"misc@openbsd.org" <misc@openbsd.org>, brian@Awfulhak.org=> pcount 2
1 email <misc@openbsd.org>
personal <misc@openbsd.org>
local-part <misc> domain <openbsd.org>
2 email <brian@Awfulhak.org>
local-part <brian> domain <Awfulhak.org>
"mutt-dev @ mutt . orgThomas Roessler" <roessler@does-not-exist.org>=> pcount 1
1 email <roessler@does-not-exist.org>
personal <mutt-dev @ mutt . orgThomas Roessler>
local-part <roessler> domain <does-not-exist.org>
"zwk@f36.n480.z2.fidonet.org" <zwk%f36.n480.z2.fidonet.org@f36.n480.z2.fidonet.org>=> pcount 1
1 email <zwk%f36.n480.z2.fidonet.org@f36.n480.z2.fidonet.org>
personal <zwk@f36.n480.z2.fidonet.org>
local-part <zwk%f36.n480.z2.fidonet.org> domain <f36.n480.z2.fidonet.org>
'Dan Dall'Acqua' <ddallacqua@noetic.ab.ca>, 'Dave Shyong'=> error MU_ERR_BAD_822_FORMAT
0xdeadbeef-request@petting-zoo.net=> pcount 1
1 email <0xdeadbeef-request@petting-zoo.net>
local-part <0xdeadbeef-request> domain <petting-zoo.net>
102023-00406421@cnxt19932218.conexant.com=> pcount 1
1 email <102023-00406421@cnxt19932218.conexant.com>
local-part <102023-00406421> domain <cnxt19932218.conexant.com>
218164.24.43@jobcontrolcenter.com=> pcount 1
1 email <218164.24.43@jobcontrolcenter.com>
local-part <218164.24.43> domain <jobcontrolcenter.com>
<0xdeadbeef-request@petting-zoo.net>=> pcount 1
1 email <0xdeadbeef-request@petting-zoo.net>
local-part <0xdeadbeef-request> domain <petting-zoo.net>
<>=> pcount 1
1 email <>
<Christia.Roberts@nrc.ca>=> pcount 1
1 email <Christia.Roberts@nrc.ca>
local-part <Christia.Roberts> domain <nrc.ca>
<Nick_Shelness@motorcity2.lotus.com>=> pcount 1
1 email <Nick_Shelness@motorcity2.lotus.com>
local-part <Nick_Shelness> domain <motorcity2.lotus.com>
<all: >=> error MU_ERR_BAD_822_FORMAT
<fyi-admin@emyr.net>=> pcount 1
1 email <fyi-admin@emyr.net>
local-part <fyi-admin> domain <emyr.net>
<gary.stefanov@medtronic.com>, <HdeVisse@husky.ca>,=> pcount 2
1 email <gary.stefanov@medtronic.com>
local-part <gary.stefanov> domain <medtronic.com>
2 email <HdeVisse@husky.ca>
local-part <HdeVisse> domain <husky.ca>
<gnu-pop-list@nodomainname.net>=> pcount 1
1 email <gnu-pop-list@nodomainname.net>
local-part <gnu-pop-list> domain <nodomainname.net>
<mutt-dev-owner-sroberts=uniserve.com@ns.gbnet.net>=> pcount 1
1 email <mutt-dev-owner-sroberts=uniserve.com@ns.gbnet.net>
local-part <mutt-dev-owner-sroberts=uniserve.com> domain <ns.gbnet.net>
=?ISO-8859-1?Q?Kolbj=F8rn_Barmen?= <kolla@nvg.ntnu.no>=> pcount 1
1 email <kolla@nvg.ntnu.no>
personal <=?ISO-8859-1?Q?Kolbj=F8rn_Barmen?=>
local-part <kolla> domain <nvg.ntnu.no>
=?ISO-8859-1?Q?Patrik_F=E4ltstr=F6m?= <paf@cisco.com>=> pcount 1
1 email <paf@cisco.com>
personal <=?ISO-8859-1?Q?Patrik_F=E4ltstr=F6m?=>
local-part <paf> domain <cisco.com>
=?ISO-8859-1?Q?Patrik_F=E4ltstr=F6m?= <paf@cisco.com>,=> pcount 1
1 email <paf@cisco.com>
personal <=?ISO-8859-1?Q?Patrik_F=E4ltstr=F6m?=>
local-part <paf> domain <cisco.com>
=?US-ASCII?Q?gary=5Fc?= <gary_c@cunningham-lee.com>=> pcount 1
1 email <gary_c@cunningham-lee.com>
personal <=?US-ASCII?Q?gary=5Fc?=>
local-part <gary_c> domain <cunningham-lee.com>
=?iso-8859-1?Q?Fr=E9d=E9ric_L_=2E_W_=2E?= Meunier <0@pervalidus.net>=> pcount 1
1 email <0@pervalidus.net>
personal <=?iso-8859-1?Q?Fr=E9d=E9ric_L_=2E_W_=2E?= Meunier>
local-part <0> domain <pervalidus.net>
=?iso-8859-1?Q?Fr=E9d=E9ric_L_=2E_W_=2E?= Meunier <0@pervalidus.net>,=> pcount 1
1 email <0@pervalidus.net>
personal <=?iso-8859-1?Q?Fr=E9d=E9ric_L_=2E_W_=2E?= Meunier>
local-part <0> domain <pervalidus.net>
=?iso-8859-1?Q?Fr=E9d=E9ric_L_=2E_W_=2E_Meunier?= <0@pervalidus.net>=> pcount 1
1 email <0@pervalidus.net>
personal <=?iso-8859-1?Q?Fr=E9d=E9ric_L_=2E_W_=2E_Meunier?=>
local-part <0> domain <pervalidus.net>
=?iso-8859-1?Q?J=F8rgen_Thomsen?= <jth@postfix.jth.net>=> pcount 1
1 email <jth@postfix.jth.net>
personal <=?iso-8859-1?Q?J=F8rgen_Thomsen?=>
local-part <jth> domain <postfix.jth.net>
=?iso-8859-1?Q?Jos=3F_C=2E_Garc=EDa_Sogo?= <jose@jaimedelamo.eu.org>=> pcount 1
1 email <jose@jaimedelamo.eu.org>
personal <=?iso-8859-1?Q?Jos=3F_C=2E_Garc=EDa_Sogo?=>
local-part <jose> domain <jaimedelamo.eu.org>
=?iso-8859-1?Q?Mikko_H=E4nninen?= <Mikko.Hanninen@dna.fi>=> pcount 1
1 email <Mikko.Hanninen@dna.fi>
personal <=?iso-8859-1?Q?Mikko_H=E4nninen?=>
local-part <Mikko.Hanninen> domain <dna.fi>
=?iso-8859-1?Q?Mikko_H=E4nninen?= <Mikko.Hanninen@iki.fi>=> pcount 1
1 email <Mikko.Hanninen@iki.fi>
personal <=?iso-8859-1?Q?Mikko_H=E4nninen?=>
local-part <Mikko.Hanninen> domain <iki.fi>
=?iso-8859-1?Q?R=E9mi_Guyomarch?= <rguyom@321.net>=> pcount 1
1 email <rguyom@321.net>
personal <=?iso-8859-1?Q?R=E9mi_Guyomarch?=>
local-part <rguyom> domain <321.net>
=?iso-8859-1?Q?Ulf_M=F6ller?= <ulf@fitug.de>=> pcount 1
1 email <ulf@fitug.de>
personal <=?iso-8859-1?Q?Ulf_M=F6ller?=>
local-part <ulf> domain <fitug.de>
ANDREW MARTIN <amartin@ee.ryerson.ca>=> pcount 1
1 email <amartin@ee.ryerson.ca>
personal <ANDREW MARTIN>
local-part <amartin> domain <ee.ryerson.ca>
Abhay Ghaisas <abhay@sobolev.does-not-exist.org>, mutt-dev@mutt.org=> pcount 2
1 email <abhay@sobolev.does-not-exist.org>
personal <Abhay Ghaisas>
local-part <abhay> domain <sobolev.does-not-exist.org>
2 email <mutt-dev@mutt.org>
local-part <mutt-dev> domain <mutt.org>
Brian Salter-Duke <b_duke@lacebark.ntu.edu.au>=> pcount 1
1 email <b_duke@lacebark.ntu.edu.au>
personal <Brian Salter-Duke>
local-part <b_duke> domain <lacebark.ntu.edu.au>
Catharine Shyong <shyong@t-iii.com>=> pcount 1
1 email <shyong@t-iii.com>
personal <Catharine Shyong>
local-part <shyong> domain <t-iii.com>
DRUMS-Last-Call:;=> error MU_ERR_EMPTY_ADDRESS
Detailed Revision/Update of Message Standards <drums@cs.utk.edu>=> pcount 1
1 email <drums@cs.utk.edu>
personal <Detailed Revision/Update of Message Standards>
local-part <drums> domain <cs.utk.edu>
Eric Allman <eric+ietf@Sendmail.ORG>=> pcount 1
1 email <eric+ietf@Sendmail.ORG>
personal <Eric Allman>
local-part <eric+ietf> domain <Sendmail.ORG>
Gary <Gary@e-c-s-uk.com>=> pcount 1
1 email <Gary@e-c-s-uk.com>
personal <Gary>
local-part <Gary> domain <e-c-s-uk.com>
IETF working group on revision of mail standards <drums@cs.utk.edu>=> pcount 1
1 email <drums@cs.utk.edu>
personal <IETF working group on revision of mail standards>
local-part <drums> domain <cs.utk.edu>
IETF-Announce:;=> error MU_ERR_EMPTY_ADDRESS
IETF-Announce:;, drums@cs.utk.edu=> pcount 1
1 email <drums@cs.utk.edu>
local-part <drums> domain <cs.utk.edu>
Jean-Baptiste Marchand <Jean-Baptiste.Marchand@epita.fr>=> pcount 1
1 email <Jean-Baptiste.Marchand@epita.fr>
personal <Jean-Baptiste Marchand>
local-part <Jean-Baptiste.Marchand> domain <epita.fr>
Jonathan Rozes <jrozes+969649116.89117462@vinton.com>=> pcount 1
1 email <jrozes+969649116.89117462@vinton.com>
personal <Jonathan Rozes>
local-part <jrozes+969649116.89117462> domain <vinton.com>
Jose "C." Garcia Sogo<jose@jaimedelamo.eu.org>=> pcount 1
1 email <jose@jaimedelamo.eu.org>
personal <Jose C. Garcia Sogo>
local-part <jose> domain <jaimedelamo.eu.org>
Marco d'Itri <md@Linux.IT>=> pcount 1
1 email <md@Linux.IT>
personal <Marco d'Itri>
local-part <md> domain <Linux.IT>
No_Reply-To@mapquest.com=> pcount 1
1 email <No_Reply-To@mapquest.com>
local-part <No_Reply-To> domain <mapquest.com>
OSULLIE@rte.ie, skidswam@hotmail.com, boot=> pcount 3
1 email <OSULLIE@rte.ie>
local-part <OSULLIE> domain <rte.ie>
2 email <skidswam@hotmail.com>
local-part <skidswam> domain <hotmail.com>
3 email <boot@localhost>
local-part <boot>
Paul Hoffman / IMC <phoffman@imc.org>=> pcount 1
1 email <phoffman@imc.org>
personal <Paul Hoffman / IMC>
local-part <phoffman> domain <imc.org>
Sam=> pcount 1
1 email <Sam@localhost>
local-part <Sam>
Sam Roberts <sam@cogent.ca>=> pcount 1
1 email <sam@cogent.ca>
personal <Sam Roberts>
local-part <sam> domain <cogent.ca>
Sam_Roberts/Certicom%Certicom@certicom.com=> pcount 1
1 email <Sam_Roberts/Certicom%Certicom@certicom.com>
local-part <Sam_Roberts/Certicom%Certicom> domain <certicom.com>
Thomas Roessler <roessler@does-not-exist.org>, 490@bugs.guug.de=> pcount 2
1 email <roessler@does-not-exist.org>
personal <Thomas Roessler>
local-part <roessler> domain <does-not-exist.org>
2 email <490@bugs.guug.de>
local-part <490> domain <bugs.guug.de>
Thomas Roessler <roessler@does-not-exist.org>, g10@gnupg.org=> pcount 2
1 email <roessler@does-not-exist.org>
personal <Thomas Roessler>
local-part <roessler> domain <does-not-exist.org>
2 email <g10@gnupg.org>
local-part <g10> domain <gnupg.org>
ddickey@ip-12-22-50-150.hqglobal.net=> pcount 1
1 email <ddickey@ip-12-22-50-150.hqglobal.net>
local-part <ddickey> domain <ip-12-22-50-150.hqglobal.net>
ktb <x.y.f@home.com>=> pcount 1
1 email <x.y.f@home.com>
personal <ktb>
local-part <x.y.f> domain <home.com>
mcaustin@eudoramail.com, aposner@usaid.gov, Kieran.O'Leary@anpost.ie,=> pcount 3
1 email <mcaustin@eudoramail.com>
local-part <mcaustin> domain <eudoramail.com>
2 email <aposner@usaid.gov>
local-part <aposner> domain <usaid.gov>
3 email <Kieran.O'Leary@anpost.ie>
local-part <Kieran.O'Leary> domain <anpost.ie>
rfunk@wks.uts.ohio-state.eduofflinemailer-bounce@dikke.penguin.nl=> error MU_ERR_BAD_822_FORMAT
root=> pcount 1
1 email <root@localhost>
local-part <root>
srr <sam@localhost>=> error MU_ERR_BAD_822_FORMAT
whom it may concern: ;;whom.it.may.concern: ;=> error MU_ERR_BAD_822_FORMAT
whom it may concern: mutt-dev@mutt.org, mutt-users@mutt.org;=> pcount 2
1 email <mutt-dev@mutt.org>
local-part <mutt-dev> domain <mutt.org>
2 email <mutt-users@mutt.org>
local-part <mutt-users> domain <mutt.org>
Sergey V. Poznyakoff <gray@gnu.org>=> pcount 1
1 email <gray@gnu.org>
personal <Sergey V. Poznyakoff>
local-part <gray> domain <gnu.org>
P. D. Q. Bach <bach@somewhere.org>=> pcount 1
1 email <bach@somewhere.org>
personal <P. D. Q. Bach>
local-part <bach> domain <somewhere.org>
"A bad quote\" <devnull@localhost>=> error MU_ERR_BAD_822_FORMAT
# NOTE: This file must end with an empty line
# This file is part of Mailutils testsuite.
# Copyright (C) 2005, 2007, 2010 Free Software Foundation, Inc.
#
# This program 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 of the License, 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 this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
1 2 3
3: 1 2 3
quoted\ space
1: "quoted space"
a "tab character"
2: a tab\tcharacter
\157\143\164\141\154\40and\x20\x68\x65\x78
1: "octal and hex"
\157\143\164\141\154\40 and \x20\x68\x65\x78
3: "octal " and " hex"
A\x3-\48\39
1: A\003-\0048\0039
# FIXME: Tcl is not able to properly handle binary data, even with
# fconfigure -binary, so I had to disable this test
#message: ASCII upper part
#×ÅÒÈÎÑÑ ÐÏÌÏ×ÉÎÁ ÔÁÂÌÉÃÙ
#3: \327\305\322\310\316\321\321 \320\317\314\317\327\311\316\301 \324\301\302\314\311\303\331
messed up'quotations ' in "a single'" "command" lin"e
6: messed "upquotations " in "a single'" command "lin\"e"
'unbalanced "quote
2: 'unbalanced "\"quote"
unbalanced "quote
2: unbalanced "\"quote"
"
1: "\""
# This file is part of Mailutils testsuite.
# Copyright (C) 2003, 2006, 2007, 2010 Free Software Foundation, Inc.
#
# This program 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 of the License, 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 this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
=?US-ASCII?Q?Keith_Moore?= <moore@cs.utk.edu> => Success
Keith Moore <moore@cs.utk.edu>
=?ISO-8859-1?Q?Keld_J=F8rn_Simonsen?= <keld@dkuug.dk> => Success
Keld J\370rn Simonsen <keld@dkuug.dk>
=?ISO-8859-1?Q?Andr=E9?= Pirard <PIRARD@vm1.ulg.ac.be> => Success
Andr\351 Pirard <PIRARD@vm1.ulg.ac.be>
=?ISO-8859-1?B?SWYgeW91IGNhbiByZWFkIHRoaXMgeW8=?= ... =?ISO-8859-2?B?dSB1bmRlcnN0YW5kIHRoZSBleGFtcGxlLg==?= => Success
If you can read this yo ... u understand the example.
# Malformed input string: lacks trailing =. MU 0.6.90 hanged on it.
=?koi8-r?B?RndkOiDSxcfJ09TSwcPJ0SDEz83FzsE?= => Success
Fwd: \322\305\307\311\323\324\322\301\303
# NOTE: This file must end with an empty line
# EOF
# This file is part of Mailutils testsuite.
# Copyright (C) 2006, 2007, 2010 Free Software Foundation, Inc.
#
# This program 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 of the License, 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 this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
\ckoi8-r
\eB
\o
-message 16-bytes string
#Cyrillic: åÖÅÄÎÅ×ÎÙÊ ÏÔÞÅÔ
\\345\326\305\304\316\305\327\316\331\312\040\317\324\336\305\324=> Success
=?koi8-r?B?5dbFxM7F187ZyiDP1N7F1A==?=
# NOTE: This file must end with an empty line
# EOF
# This file is part of Mailutils testsuite.
# Copyright (C) 2002, 2007, 2010 Free Software Foundation, Inc.
#
# This program 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 of the License, 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 this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
text/plain; less '%s'; needsterminal
entry
typefield: text/plain
view-command: less '%s'
fields[1]: needsterminal
text/html; gnome-help-browser '%s'; nametemplate=%s.html; test=test -n "$DISPLAY"
entry
typefield: text/html
view-command: gnome-help-browser '%s'
fields[1]: nametemplate=%s.html
fields[2]: test=test -n "$DISPLAY"
application/x-troff-man; /usr/bin/nroff -mandoc -Tlatin1; \
copiousoutput; print=/usr/bin/nroff -mandoc -Tlatin1 | print text/plain:-
entry
typefield: application/x-troff-man
view-command: /usr/bin/nroff -mandoc -Tlatin1
fields[1]: copiousoutput
fields[2]: print=/usr/bin/nroff -mandoc -Tlatin1 | print text/plain:-
text/plain; shownonascii iso-8859-1 '%s'; description="Plain ASCII Text"; \
test=test "$(echo %{charset} | tr "[A-Z]" "[a-z]")" = iso-8859-1 -a "$DISPLAY" != ""
entry
typefield: text/plain
view-command: shownonascii iso-8859-1 '%s'
fields[1]: description="Plain ASCII Text"
fields[2]: test=test "$(echo %{charset} | tr "[A-Z]" "[a-z]")" = iso-8859-1 -a "$DISPLAY" != ""
text/richtext; shownonascii iso-8859-1 -e richtext -p '%s'; \
description="Richtext"; copiousoutput; \
test=test "$(echo %{charset} | tr "[A-Z]" "[a-z]")" = iso-8859-1 -a "$DISPLAY" != ""
entry
typefield: text/richtext
view-command: shownonascii iso-8859-1 -e richtext -p '%s'
fields[1]: description="Richtext"
fields[2]: copiousoutput
fields[3]: test=test "$(echo %{charset} | tr "[A-Z]" "[a-z]")" = iso-8859-1 -a "$DISPLAY" != ""
text/enriched; shownonascii iso-8859-1 -e richtext -e -p '%s'; \
description="Enriched Text"; \
copiousoutput; \
test=test "$(echo %{charset} | tr "[A-Z]" "[a-z]")" = iso-8859-1 -a "$DISPLAY" != ""
entry
typefield: text/enriched
view-command: shownonascii iso-8859-1 -e richtext -e -p '%s'
fields[1]: description="Enriched Text"
fields[2]: copiousoutput
fields[3]: test=test "$(echo %{charset} | tr "[A-Z]" "[a-z]")" = iso-8859-1 -a "$DISPLAY" != ""
message/partial; showpartial '%s' %{id} %{number} %{total}; description="An incomplete message"
entry
typefield: message/partial
view-command: showpartial '%s' %{id} %{number} %{total}
fields[1]: description="An incomplete message"
message/external-body; showexternal '%s' %{access-type} %{name} %{site} %{directory} %{mode} %{server}; needsterminal; description="A reference to data stored in an external location"; composetyped="extcompose '%s"'
entry
typefield: message/external-body
view-command: showexternal '%s' %{access-type} %{name} %{site} %{directory} %{mode} %{server}
fields[1]: needsterminal
fields[2]: description="A reference to data stored in an external location"
fields[3]: composetyped="extcompose '%s"'
application/x-dvi; /usr/bin/xdvi '%s'; test=test -n "$DISPLAY"; description=TeX DVI file; nametemplate=%s.dvi
entry
typefield: application/x-dvi
view-command: /usr/bin/xdvi '%s'
fields[1]: test=test -n "$DISPLAY"
fields[2]: description=TeX DVI file
fields[3]: nametemplate=%s.dvi
text/plain; more '%s'; needsterminal
entry
typefield: text/plain
view-command: more '%s'
fields[1]: needsterminal
text/html; /usr/bin/links '%s'; needsterminal; description=HTML Text; nametemplate=%s.html
entry
typefield: text/html
view-command: /usr/bin/links '%s'
fields[1]: needsterminal
fields[2]: description=HTML Text
fields[3]: nametemplate=%s.html
text/richtext; richtext '%s'; description="Richtext"; copiousoutput
entry
typefield: text/richtext
view-command: richtext '%s'
fields[1]: description="Richtext"
fields[2]: copiousoutput
text/enriched; richtext -e '%s'; description="Enriched Text"; copiousoutput
entry
typefield: text/enriched
view-command: richtext -e '%s'
fields[1]: description="Enriched Text"
fields[2]: copiousoutput
text/html; /usr/bin/w3m -T text/html '%s'; needsterminal; description=HTML Text; nametemplate=%s.html
entry
typefield: text/html
view-command: /usr/bin/w3m -T text/html '%s'
fields[1]: needsterminal
fields[2]: description=HTML Text
fields[3]: nametemplate=%s.html
text/html; /usr/bin/links -dump '%s'; copiousoutput; description=HTML Text; nametemplate=%s.html
entry
typefield: text/html
view-command: /usr/bin/links -dump '%s'
fields[1]: copiousoutput
fields[2]: description=HTML Text
fields[3]: nametemplate=%s.html
text/html; /usr/bin/lynx -force_html '%s'; needsterminal; description=HTML Text; nametemplate=%s.html
entry
typefield: text/html
view-command: /usr/bin/lynx -force_html '%s'
fields[1]: needsterminal
fields[2]: description=HTML Text
fields[3]: nametemplate=%s.html
text/html; /usr/bin/w3m -dump -T text/html '%s'; copiousoutput; description=HTML Text; nametemplate=%s.html
entry
typefield: text/html
view-command: /usr/bin/w3m -dump -T text/html '%s'
fields[1]: copiousoutput
fields[2]: description=HTML Text
fields[3]: nametemplate=%s.html
text/html; /usr/bin/html2text '%s'; copiousoutput; description=HTML Text
entry
typefield: text/html
view-command: /usr/bin/html2text '%s'
fields[1]: copiousoutput
fields[2]: description=HTML Text
text/html; /usr/bin/lynx -dump -force_html '%s'; copiousoutput; description=HTML Text; nametemplate=%s.html
entry
typefield: text/html
view-command: /usr/bin/lynx -dump -force_html '%s'
fields[1]: copiousoutput
fields[2]: description=HTML Text
fields[3]: nametemplate=%s.html
text/*; less '%s'; needsterminal
entry
typefield: text/*
view-command: less '%s'
fields[1]: needsterminal
text/*; more '%s'; needsterminal
entry
typefield: text/*
view-command: more '%s'
fields[1]: needsterminal
application/x-debian-package; /usr/lib/mime/debian-view '%s'; \
needsterminal; description=Debian GNU/Linux Package; \
nametemplate=%s.deb
entry
typefield: application/x-debian-package
view-command: /usr/lib/mime/debian-view '%s'
fields[1]: needsterminal
fields[2]: description=Debian GNU/Linux Package
fields[3]: nametemplate=%s.deb
audio/basic; /usr/lib/mime/playaudio '%s'; description=Basic uLaw Audio; \
nametemplate=%s.au
entry
typefield: audio/basic
view-command: /usr/lib/mime/playaudio '%s'
fields[1]: description=Basic uLaw Audio
fields[2]: nametemplate=%s.au
# End of Mailcap
## Process this file with GNU Automake to create Makefile.in
## Copyright (C) 2002, 2003, 2007, 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 this program; if not, write to the Free Software
## Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA
## 02110-1301 USA
AUTOMAKE_OPTIONS = dejagnu
DEJATOOL = mailbox
RUNTESTFLAGS =
CLEANFILES = *.log
test_dirs = lib mailbox
EXTRA_DIST = Addrs Argcv Mailcap Mime Urls Encode Decode Encode2047 Decode2047
dist-hook:
here=`cd $(top_builddir)/$(subdir) && pwd`; \
srcdir=`cd $(srcdir) && pwd`; \
distdir=`cd $(distdir) && pwd`; \
for dir in $(test_dirs); \
do \
cd $$srcdir;\
mkdir $$distdir/$$dir;\
cd $$dir;\
for file in DISTFILES `cat DISTFILES`; do \
d=$$srcdir/$$dir; \
if test -d $$d/$$file; then \
cp -pr $$d/$$file $$distdir/$$dir/$$file; \
else \
test -f $$distdir/$$dir/$$file \
|| cp -p $$d/$$file $$distdir/$$dir/$$file || exit; \
fi; \
done;\
done;\
cd $$here
site.exp: Makefile remote.exp
@echo 'Making a new site.exp file...'
@test ! -f site.bak || rm -f site.bak
@echo '## these variables are automatically generated by make ##' > $@-t
@echo '# Do not edit here. If you wish to override these values' >> $@-t
@echo '# edit the last section' >> $@-t
@echo 'set tool $(DEJATOOL)' >> $@-t
@echo "set top_srcdir `cd $(top_srcdir); pwd`" >> $@-t
@echo "set top_builddir `cd $(top_builddir); pwd`" >> $@-t
@echo "set srcdir `cd $(srcdir); pwd`" >> $@-t
@echo 'set objdir' `pwd` >> $@-t
@echo 'set host_alias "$(host_alias)"' >> $@-t
@echo 'set host_triplet $(host_triplet)' >> $@-t
@echo 'set target_alias "$(target_alias)"' >> $@-t
@echo 'set target_triplet $(target_triplet)' >> $@-t
@echo 'set build_alias "$(build_alias)"' >> $@-t
@echo 'set build_triplet $(build_triplet)' >> $@-t
@echo '## All variables above are generated by configure. Do Not Edit ##' >> $@-t
@test ! -f site.exp || sed '1,/^## All variables above are.*##/ d' site.exp >> $@-t
@test ! -f site.exp || mv site.exp site.bak
@mv $@-t site.exp
remote.exp:;
@echo 'Making a new remote.exp file...'
@test ! -f remote.bak || rm -f remote.bak
@echo '## These variables are used to set up for the remote testing.' >> $@-t
@echo '## Please, read file README in this directory for instructions' >> $@-t
@echo '## on how to use this file' >> $@-t
@echo "set host_board `hostname`" >> $@-t
@echo 'set board_info($$host_board,connect) rlogin' >> $@-t
@echo 'set board_info($$host_board,shell_prompt) "\\$$ "' >> $@-t
@echo "set board_info(\$$host_board,top_srcdir) `cd $(top_srcdir); pwd`" >> $@-t
@echo "set board_info(\$$host_board,top_builddir) `cd $(top_builddir); pwd`" >> $@-t
@echo "set board_info(\$$host_board,srcdir) `cd $(srcdir); pwd`" >> $@-t
@echo "set board_info(\$$host_board,objdir) `pwd`" >> $@-t
@echo "set board_info(\$$host_board,top_srcdir) `cd $(top_srcdir); pwd`" >> $@-t
@echo "set board_info(\$$host_board,top_builddir) `cd $(top_builddir); pwd`" >> $@-t
@test ! -f remote.exp || mv remote.exp remote.bak
@mv $@-t remote.exp
DISTCLEANFILES=*.exp *.log *.sum
distclean-local:
-rm -rf data
# This file is part of Mailutils testsuite.
# Copyright (C) 2002, 2007, 2008 Free Software Foundation
#
# This program 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 of the License, 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 this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# NOTE: Expected lines must be indented with exactly one tab character.
scheme: => SUCCESS
scheme <scheme>
user <>
passwd <>
auth <>
host <>
port 0
path <>
scheme:/absolute/path => SUCCESS
scheme <scheme>
user <>
passwd <>
auth <>
host <>
port 0
path </absolute/path>
scheme:relative/path => SUCCESS
scheme <scheme>
user <>
passwd <>
auth <>
host <>
port 0
path <relative/path>
scheme:///absolute/path => SUCCESS
scheme <scheme>
user <>
passwd <>
auth <>
host <>
port 0
path </absolute/path>
scheme://%75%73%65%72:%70%61%73%73@%68%6f%73%74 => SUCCESS
scheme <scheme>
user <user>
passwd <pass>
auth <>
host <host>
port 0
path <>
ftp://user:pass@host//a/path => SUCCESS
scheme <ftp>
user <user>
passwd <pass>
auth <>
host <host>
port 0
path </a/path>
ftp://:pass@host//a/path => SUCCESS
scheme <ftp>
user <>
passwd <pass>
auth <>
host <host>
port 0
path </a/path>
ftp://user:@host//a/path => SUCCESS
scheme <ftp>
user <user>
passwd <>
auth <>
host <host>
port 0
path </a/path>
ftp://user:pass@//a/path => SUCCESS
scheme <ftp>
user <user>
passwd <pass>
auth <>
host <>
port 0
path </a/path>
ftp://user:@//a/path => SUCCESS
scheme <ftp>
user <user>
passwd <>
auth <>
host <>
port 0
path </a/path>
ftp://:@host//a/path => SUCCESS
scheme <ftp>
user <>
passwd <>
auth <>
host <host>
port 0
path </a/path>
ftp://:pass@//a/path => SUCCESS
scheme <ftp>
user <>
passwd <pass>
auth <>
host <>
port 0
path </a/path>
ftp://:@//a/path => SUCCESS
scheme <ftp>
user <>
passwd <>
auth <>
host <>
port 0
path </a/path>
ftp://://a/path => SUCCESS
scheme <ftp>
user <>
passwd <>
auth <>
host <>
port 0
path </a/path>
ftp://@//a/path => SUCCESS
scheme <ftp>
user <>
passwd <>
auth <>
host <>
port 0
path </a/path>
ftp:/a/path => SUCCESS
scheme <ftp>
user <>
passwd <>
auth <>
host <>
port 0
path </a/path>
ftp://user:pass@host/a/path => SUCCESS
scheme <ftp>
user <user>
passwd <pass>
auth <>
host <host>
port 0
path <a/path>
ftp://:pass@host/a/path => SUCCESS
scheme <ftp>
user <>
passwd <pass>
auth <>
host <host>
port 0
path <a/path>
ftp://user:@host/a/path => SUCCESS
scheme <ftp>
user <user>
passwd <>
auth <>
host <host>
port 0
path <a/path>
ftp://user:pass@/a/path => SUCCESS
scheme <ftp>
user <user>
passwd <pass>
auth <>
host <>
port 0
path <a/path>
ftp://user:@/a/path => SUCCESS
scheme <ftp>
user <user>
passwd <>
auth <>
host <>
port 0
path <a/path>
ftp://:@host/a/path => SUCCESS
scheme <ftp>
user <>
passwd <>
auth <>
host <host>
port 0
path <a/path>
ftp://:pass@/a/path => SUCCESS
scheme <ftp>
user <>
passwd <pass>
auth <>
host <>
port 0
path <a/path>
ftp://:@/a/path => SUCCESS
scheme <ftp>
user <>
passwd <>
auth <>
host <>
port 0
path <a/path>
ftp://:/a/path => SUCCESS
scheme <ftp>
user <>
passwd <>
auth <>
host <>
port 0
path <a/path>
ftp://@/a/path => SUCCESS
scheme <ftp>
user <>
passwd <>
auth <>
host <>
port 0
path <a/path>
ftp:///a/path => SUCCESS
scheme <ftp>
user <>
passwd <>
auth <>
host <>
port 0
path </a/path>
pop://pop.example.net => SUCCESS
scheme <pop>
user <>
passwd <>
auth <>
host <pop.example.net>
port 0
path <>
pop://user@pop.example.net => SUCCESS
scheme <pop>
user <user>
passwd <>
auth <>
host <pop.example.net>
port 0
path <>
pop://user:passwd@pop.example.net => SUCCESS
scheme <pop>
user <user>
passwd <passwd>
auth <>
host <pop.example.net>
port 0
path <>
pop://user;auth=*@pop.example.net => SUCCESS
scheme <pop>
user <user>
passwd <>
auth <*>
host <pop.example.net>
port 0
path <>
pop://pop.example.net:111 => SUCCESS
scheme <pop>
user <>
passwd <>
auth <>
host <pop.example.net>
port 111
path <>
pop://user@pop.example.net:111 => SUCCESS
scheme <pop>
user <user>
passwd <>
auth <>
host <pop.example.net>
port 111
path <>
pop://user:passwd@pop.example.net:111 => SUCCESS
scheme <pop>
user <user>
passwd <passwd>
auth <>
host <pop.example.net>
port 111
path <>
pop://user;auth=*@pop.example.net:111 => SUCCESS
scheme <pop>
user <user>
passwd <>
auth <*>
host <pop.example.net>
port 111
path <>
imap://imap.example.net => SUCCESS
scheme <imap>
user <>
passwd <>
auth <>
host <imap.example.net>
port 0
path <>
imap://user@imap.example.net => SUCCESS
scheme <imap>
user <user>
passwd <>
auth <>
host <imap.example.net>
port 0
path <>
imap://user:passwd@imap.example.net => SUCCESS
scheme <imap>
user <user>
passwd <passwd>
auth <>
host <imap.example.net>
port 0
path <>
imap://user;auth=*@imap.example.net => SUCCESS
scheme <imap>
user <user>
passwd <>
auth <*>
host <imap.example.net>
port 0
path <>
imap://imap.example.net:111 => SUCCESS
scheme <imap>
user <>
passwd <>
auth <>
host <imap.example.net>
port 111
path <>
imap://user@imap.example.net:111 => SUCCESS
scheme <imap>
user <user>
passwd <>
auth <>
host <imap.example.net>
port 111
path <>
imap://user:passwd@imap.example.net:111 => SUCCESS
scheme <imap>
user <user>
passwd <passwd>
auth <>
host <imap.example.net>
port 111
path <>
imap://user;auth=*@imap.example.net:111 => SUCCESS
scheme <imap>
user <user>
passwd <>
auth <*>
host <imap.example.net>
port 111
path <>
imap://imap.example.net/mbox => SUCCESS
scheme <imap>
user <>
passwd <>
auth <>
host <imap.example.net>
port 0
path <mbox>
imap://user@imap.example.net/mbox => SUCCESS
scheme <imap>
user <user>
passwd <>
auth <>
host <imap.example.net>
port 0
path <mbox>
imap://user:passwd@imap.example.net/mbox => SUCCESS
scheme <imap>
user <user>
passwd <passwd>
auth <>
host <imap.example.net>
port 0
path <mbox>
imap://user;auth=*@imap.example.net/mbox => SUCCESS
scheme <imap>
user <user>
passwd <>
auth <*>
host <imap.example.net>
port 0
path <mbox>
imap://imap.example.net:111/mbox => SUCCESS
scheme <imap>
user <>
passwd <>
auth <>
host <imap.example.net>
port 111
path <mbox>
imap://user@imap.example.net:111/mbox => SUCCESS
scheme <imap>
user <user>
passwd <>
auth <>
host <imap.example.net>
port 111
path <mbox>
imap://user:passwd@imap.example.net:111/mbox => SUCCESS
scheme <imap>
user <user>
passwd <passwd>
auth <>
host <imap.example.net>
port 111
path <mbox>
imap://user;auth=*@imap.example.net:111/mbox => SUCCESS
scheme <imap>
user <user>
passwd <>
auth <*>
host <imap.example.net>
port 111
path <mbox>
imap://imap.example.net/mbox/user@host => SUCCESS
scheme <imap>
user <imap.example.net/mbox/user>
passwd <>
auth <>
host <host>
port 0
path <>
imap://user@imap.example.net/mbox/user@host => SUCCESS
scheme <imap>
user <user>
passwd <>
auth <>
host <imap.example.net>
port 0
path <mbox/user@host>
imap://user:passwd@imap.example.net/mbox/user@host => SUCCESS
scheme <imap>
user <user>
passwd <passwd>
auth <>
host <imap.example.net>
port 0
path <mbox/user@host>
imap://user;auth=*@imap.example.net/mbox/user@host => SUCCESS
scheme <imap>
user <user>
passwd <>
auth <*>
host <imap.example.net>
port 0
path <mbox/user@host>
imap://imap.example.net:111/mbox/user@host => SUCCESS
scheme <imap>
user <imap.example.net>
passwd <111/mbox/user>
auth <>
host <host>
port 0
path <>
imap://user@imap.example.net:111/mbox/user@host => SUCCESS
scheme <imap>
user <user>
passwd <>
auth <>
host <imap.example.net>
port 111
path <mbox/user@host>
imap://user:passwd@imap.example.net:111/mbox/user@host => SUCCESS
scheme <imap>
user <user>
passwd <passwd>
auth <>
host <imap.example.net>
port 111
path <mbox/user@host>
imap://user;auth=*@imap.example.net:111/mbox/user@host => SUCCESS
scheme <imap>
user <user>
passwd <>
auth <*>
host <imap.example.net>
port 111
path <mbox/user@host>
ftp://ftp.example.org/mbox/user%40host => SUCCESS
scheme <ftp>
user <>
passwd <>
auth <>
host <ftp.example.org>
port 0
path <mbox/user@host>
ftp://ftp.example.org:111/mbox/user%40host => SUCCESS
scheme <ftp>
user <>
passwd <>
auth <>
host <ftp.example.org>
port 111
path <mbox/user@host>
ftp://ftp.example.org:111/mbox/user%40host;type=pass => SUCCESS
scheme <ftp>
user <>
passwd <>
auth <>
host <ftp.example.org>
port 111
path <mbox/user@host>
param[0] <type=pass>
mbox:/var/spool/mail;type=index;param=2;user=gray => SUCCESS
scheme <mbox>
user <>
passwd <>
auth <>
host <>
port 0
path </var/spool/mail>
param[0] <type=index>
param[1] <param=2>
param[2] <user=gray>
mbox:///var/spool/mail;type=index;param=2;user=gray => SUCCESS
scheme <mbox>
user <>
passwd <>
auth <>
host <>
port 0
path </var/spool/mail>
param[0] <type=index>
param[1] <param=2>
param[2] <user=gray>
http:///gnu.org.ua/home/gray?prog&arg1&arg2
scheme <http>
user <>
passwd <>
auth <>
host <gnu.org.ua>
port 0
path <home/gray>
query[0] <prog>
query[1] <arg1>
query[2] <arg2>
http:///gnu.org.ua/home/gray;foo=bar;baz=qux?prog&arg%201&arg%202
scheme <http>
user <>
passwd <>
auth <>
host <gnu.org.ua>
port 0
path <home/gray>
param[0] <foo=bar>
param[1] <baz=qux>
query[0] <prog>
query[1] <arg 1>
query[2] <arg 2>
# NOTE: This file must end with an empty line
# -*- tcl -*-
# This file is part of Mailutils testsuite.
# Copyright (C) 2002, 2007, 2009, 2010 Free Software Foundation, Inc.
#
# This program 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 of the License, 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 this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301 USA.
source $top_srcdir/testsuite/lib/mailutils.exp
mu_init
proc mailbox_run {args} {
global verbose
global expect_out
set sw ""
for {set i 0} {$i < [llength $args]} {incr i} {
set a [lindex $args $i]
if {"$a" == "-mail-spool"} {
if [info exists host_board] {
if [board_info $host_board exists top_srcdir] {
append sw "--set mailbox.mail-spool=\"'[board_info $host_board top_srcdir]/mail/testsuite/spool'\""
}
}
if {![info exists init_spool]} {
set init_spool 1
}
} elseif {"$a" == "-reuse-spool"} {
set init_spool 0
} else {
break
}
}
if [info exists init_spool] {
mu_prepare_spools
}
set args "[lrange $args $i end] $sw"
verbose "Spawning $args"
set res [remote_spawn host $args]
if { $res < 0 || $res == "" } {
perror "Spawning $args failed."
return 1;
}
return 0
}
proc mailbox_send { string } {
return [mu_send "$string"]
}
# mailbox_test [-message MESSAGE][-default (FAIL|XFAIL)]
# COMMAND [-pattern PATTERN-LIST][PATTERN...]
# COMMAND - Command to send.
# PATTERN - Sequence to expect in return.
# MESSAGE - [optional] message to output
proc mailbox_test { args } {
global verbose
global suppress_flag;
upvar timeout timeout
set default ""
set message ""
for {set i 0} {$i < [llength $args]} {incr i} {
set a [lindex $args $i]
if {"$a" == "-default"} {
incr i
set default [lindex $args $i]
} elseif {"$a" == "-message"} {
incr i
set message [lindex $args $i]
} elseif {"$a" == "-pattern"} {
incr i
set pattern [lindex $args $i]
} else {
set args [lrange $args $i end]
break
}
}
if {"$message" == ""} {
set message [lindex $args 0]
}
if $verbose>2 then {
send_user "Message is \"$message\"\n"
}
set command [lindex $args 0]
if {[llength $args] >= 2} {
set pattern [lrange $args 1 end]
}
if [info exists pattern] {
set result [mu_test $command $pattern]
} else {
set result [mu_test $command]
}
if {$result == 0} {
pass "$message"
} elseif {$result == 1} {
if { "$default" == "" || "$default" != "FAIL" } {
fail "$message"
} else {
xfail "$message"
set result 0
}
} elseif {$result == -2} {
fail "$message (timeout)"
} elseif {$result == -3} {
fail "$message (eof)"
} else {
fail "$message"
}
return $result
}
proc mailbox_prog_start {cmd} {
global verbose
global MU_TOOL
global MU_TOOL_FLAGS
global mailbox_prog_prompt
global expect_out
global mailbox_spawn_id
verbose "Spawning $cmd"
set mailbox_spawn_id [remote_spawn host $cmd]
if { $mailbox_spawn_id < 0 || $mailbox_spawn_id == "" } {
perror "Spawning $cmd failed."
return 1;
}
mu_expect 360 {
-re "\[\r\n\]?${mailbox_prog_prompt}$" {
verbose "program initialized."
}
default {
perror "program not initialized"
return 1
}
}
return 0
}
proc mailbox_prog_send { string } {
return [mu_send "$string"]
}
proc mailbox_prog_command { cmd } {
return [mu_command $cmd]
}
proc mailbox_prog_stop {} {
verbose "Stopping program"
remote_close host
}
# mailbox_prog_test [-message MESSAGE][-default (FAIL|XFAIL)][-noprompt]
# COMMAND PATTERN [PATTERN...]
# COMMAND - Command to send.
# PATTERN - Sequence to expect in return.
# MESSAGE - [optional] message to output
proc mailbox_prog_test { args } {
global verbose
global mailbox_prog_prompt
global suppress_flag;
upvar timeout timeout
set default ""
set message ""
set wait_for_prompt 1
for {set i 0} {$i < [llength $args]} {incr i} {
set a [lindex $args $i]
if {"$a" == "-default"} {
set default [lindex $args [expr $i + 1]]
incr i
} elseif {"$a" == "-message"} {
set message [lindex $args [expr $i + 1]]
incr i
} elseif {"$a" == "-noprompt"} {
set wait_for_prompt 0
} else {
set args [lrange $args $i end]
break
}
}
if {"$message" == ""} {
set message [lindex $args 0]
}
if $verbose>2 then {
send_user "Message is \"$message\"\n"
}
set command [lindex $args 0]
set pattern [lrange $args 1 end]
set result [mu_test $command $pattern]
if {$wait_for_prompt} {
mu_expect 30 {
-re "\[\r\n\]?${mailbox_prog_prompt}$" {}
default {
perror "prog not initialized"
return 1
}
}
}
if {$result == 0} {
pass "$message"
} elseif {$result == 1} {
if { "$default" == "" || "$default" != "FAIL" } {
fail "$message"
} else {
xfail "$message"
set result 0
}
} elseif {$result == -2} {
fail "$message (timeout)"
} elseif {$result == -3} {
fail "$message (eof)"
} else {
fail "$message"
}
return $result
}
address.exp
argcv.exp
base64.exp
decode2047.exp
encode2047.exp
list.exp
mailcap.exp
mime.exp
url.exp
# -*- tcl -*-
# This file is part of Mailutils testsuite.
# Copyright (C) 2002, 2007, 2010 Free Software Foundation, Inc.
#
# This program 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 of the License, 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 this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301 USA.
mailbox_run ${top_builddir}/examples/addr
set chan [open ${srcdir}/Addrs r]
set command ""
for {gets $chan line} {![eof $chan]} {gets $chan line} {
switch -regexp -- "$line" {
"^#.*" { }
"^[^ \t].*=>.*" {
regexp "(.*)=>.*" $line dummy command
set pattern [list $line]
}
"^\$" {
if {$command != ""} {
mailbox_test -pattern $pattern $command
set command ""
}
}
default {
if [info exist pattern] {
set pattern [concat $pattern [list $line]]
}
}
}
}
close $chan
# end of address.exp
# -*- tcl -*-
# This file is part of Mailutils testsuite.
# Copyright (C) 2005, 2007, 2010 Free Software Foundation, Inc.
#
# This program 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 of the License, 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 this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301 USA.
mailbox_run ${top_builddir}/examples/argcv
set chan [open ${srcdir}/Argcv r]
set command ""
set message ""
for {gets $chan line} {![eof $chan]} {gets $chan line} {
switch -regexp -- "$line" {
"^#.*" { }
"^[ \t]*\$" { }
"message:" {
regexp "message:\[ \t\]*(.*)" $line dummy message
}
default {
if {$command == ""} {
set command $line
} else {
if {$message != ""} {
mailbox_test -message $message -pattern [list $line] $command
set message ""
} else {
mailbox_test -pattern [list $line] $command
}
set command ""
}
}
}
}
if {$command != ""} {
fail "Malformed input file ${srcdir}/Argcv"
}
close $chan
# end of argcv.exp
# -*- tcl -*-
# This file is part of Mailutils testsuite.
# Copyright (C) 2002, 2007, 2010 Free Software Foundation, Inc.
#
# This program 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 of the License, 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 this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301 USA.
set MU_TOOL ${top_builddir}/examples/base64
set MU_TOOL_FLAGS ""
mu_exec -message "encode" -arg -i${srcdir}/Encode \
"AAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8gISIjJCUmJygpKissLS4vMDEyMzQ1Njc4"\
"OTo7PD0+P0BBQkNERUZHSElKS0xNTk9QUVJTVFVWV1hZWltcXV5fYGFiY2RlZmdoaWprbG1ub3Bx"\
"cnN0dXZ3eHl6e3x9fn+AgYKDhIWGh4iJiouMjY6PkJGSk5SVlpeYmZqbnJ2en6ChoqOkpaanqKmq"\
"q6ytrq+wsbKztLW2t7i5uru8vb6/wMHCw8TFxsfIycrLzM3Oz9DR0tPU1dbX2Nna29zd3t/g4eLj"\
"5OXm5+jp6uvs7e7v8PHy8/T19vf4+fr7/P3+/w=="
## Expect chokes on binary data, so let's switch base64 to printable
## octal output.
## The -l0 option ensures that the output is not split by inserting
## additional newlines.
mu_exec -message "decode" -arg -i${srcdir}/Decode -arg -dpl0 \
"\\000\\001\\002\\003\\004\\005\\006\\007\\010\\011\\012\\013\\014\\015\\016\\017\\020\\021\\022\\023\\024\\025\\026\\027\\030\\031\\032\\033\\034\\035\\036\\037 !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ\[\\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\\177\\200\\201\\202\\203\\204\\205\\206\\207\\210\\211\\212\\213\\214\\215\\216\\217\\220\\221\\222\\223\\224\\225\\226\\227\\230\\231\\232\\233\\234\\235\\236\\237\\240\\241\\242\\243\\244\\245\\246\\247\\250\\251\\252\\253\\254\\255\\256\\257\\260\\261\\262\\263\\264\\265\\266\\267\\270\\271\\272\\273\\274\\275\\276\\277\\300\\301\\302\\303\\304\\305\\306\\307\\310\\311\\312\\313\\314\\315\\316\\317\\320\\321\\322\\323\\324\\325\\326\\327\\330\\331\\332\\333\\334\\335\\336\\337\\340\\341\\342\\343\\344\\345\\346\\347\\350\\351\\352\\353\\354\\355\\356\\357\\360\\361\\362\\363\\364\\365\\366\\367\\370\\371\\372\\373\\374\\375\\376\\377"
# End of base64.exp
# -*- tcl -*-
# This file is part of Mailutils testsuite.
# Copyright (C) 2003, 2006, 2007, 2010 Free Software Foundation, Inc.
#
# This program 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 of the License, 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 this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301 USA.
mailbox_run ${top_builddir}/examples/decode2047 -p
set chan [open ${srcdir}/Decode2047 r]
set command ""
for {gets $chan line} {![eof $chan]} {gets $chan line} {
switch -regexp -- "$line" {
"^#.*" { }
"^[^ \t].*=>.*" {
regexp "(.*)=>.*" $line dummy command
set pattern [list $line]
}
"^\$" {
if {$command != ""} {
verbose "COMMAND $command"
verbose "PATTERN $pattern"
mailbox_test -pattern $pattern $command
set command ""
}
}
default {
if [info exist pattern] {
set pattern [concat $pattern [list $line]]
}
}
}
}
close $chan
# end of decode2047.exp
# -*- tcl -*-
# This file is part of Mailutils testsuite.
# Copyright (C) 2006, 2007, 2010 Free Software Foundation, Inc.
#
# This program 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 of the License, 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 this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301 USA.
mailbox_run ${top_builddir}/examples/encode2047
set chan [open ${srcdir}/Encode2047 r]
set command ""
set message ""
for {gets $chan line} {![eof $chan]} {gets $chan line} {
switch -regexp -- "$line" {
"^#.*" { }
"-message.*" {
regexp -- "-message (.*)" $line dummy message
}
"^\\\\\[^\\\\\]" {
mu_command $line
}
"^[^ \t].*=>.*" {
regexp "(.*)=>.*" $line dummy command
set pattern [list $line]
}
"^\$" {
if {$command != ""} {
verbose "COMMAND $command"
verbose "PATTERN $pattern"
if {$message != ""} {
mailbox_test -message $message -pattern $pattern $command
} else {
mailbox_test -pattern $pattern $command
}
set command ""
set message ""
}
}
default {
if [info exist pattern] {
set pattern [concat $pattern [list $line]]
}
}
}
}
close $chan
# end of encode2037.exp
# -*- tcl -*-
# This file is part of Mailutils testsuite.
# Copyright (C) 2003, 2005, 2007, 2008, 2010 Free Software Foundation, Inc.
#
# This program 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 of the License, 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 this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301 USA.
set current_text [list "NULL" "NULL" "NULL" "NULL"]
set current_iter 0
proc make_promt {} {
global current_iter
global current_text
global mailbox_prog_prompt
set mailbox_prog_prompt "${current_iter}:\\([lindex $current_text $current_iter]\\)> "
}
proc prompt_text {text} {
global current_iter
global current_text
set current_text [lreplace $current_text $current_iter $current_iter $text]
make_promt
}
proc prompt_iterator {iter} {
global current_iter
set current_iter $iter
make_promt
}
prompt_iterator 0
prompt_text "NULL"
mailbox_prog_start "${top_builddir}/examples/listop"
mailbox_prog_command "add en to tre fire fem"
mailbox_prog_test "print" \
"# items: 5" \
"en" \
"to" \
"tre" \
"fire" \
"fem"
prompt_text "en"
mailbox_prog_test "next"
prompt_text "tre"
mailbox_prog_test "next 2"
prompt_iterator 1
prompt_text "en"
mailbox_prog_test "iter 1"
prompt_text "to"
mailbox_prog_test "find to"
mailbox_prog_test "del tre fire"
prompt_text "fem"
mailbox_prog_test "next"
prompt_iterator 0
prompt_text "fem"
mailbox_prog_test "iter 0"
mailbox_prog_test "print" \
"# items: 3" \
"en" \
"to" \
"fem"
mailbox_prog_command "prep jeden dwa trzy cztery"
mailbox_prog_test "print" \
"# items: 7" \
"cztery" \
"trzy" \
"dwa" \
"jeden" \
"en" \
"to" \
"fem"
prompt_text "cztery"
mailbox_prog_test "first"
prompt_text "trzy"
mailbox_prog_test "del cztery"
prompt_text "3"
mailbox_prog_test "repl trzy 3"
prompt_iterator 1
mailbox_prog_test "iter 1"
prompt_text "3"
mailbox_prog_test "next 2"
mailbox_prog_command "ins jeden un"
mailbox_prog_test "print" \
"# items: 7" \
"3" \
"dwa" \
"jeden" \
"un" \
"en" \
"to" \
"fem"
mailbox_prog_command "ins before jeden zero"
mailbox_prog_test "print" \
"# items: 8" \
"3" \
"dwa" \
"zero" \
"jeden" \
"un" \
"en" \
"to" \
"fem"
prompt_text "un"
mailbox_prog_test "find un"
mailbox_prog_command "ins before un cero"
mailbox_prog_command "ins un dos"
mailbox_prog_test "print" \
"# items: 10" \
"3" \
"dwa" \
"zero" \
"jeden" \
"cero" \
"un" \
"dos" \
"en" \
"to" \
"fem"
mailbox_prog_command "ins before 3 1"
mailbox_prog_test "print" \
"# items: 11" \
"1" \
"3" \
"dwa" \
"zero" \
"jeden" \
"cero" \
"un" \
"dos" \
"en" \
"to" \
"fem"
mailbox_prog_command "ins before 3 2"
mailbox_prog_test "print" \
"# items: 12" \
"1" \
"2" \
"3" \
"dwa" \
"zero" \
"jeden" \
"cero" \
"un" \
"dos" \
"en" \
"to" \
"fem"
mailbox_prog_command "ins 3 4 5 6"
mailbox_prog_test "print" \
"# items: 15" \
"1" \
"2" \
"3" \
"4" \
"5" \
"6" \
"dwa" \
"zero" \
"jeden" \
"cero" \
"un" \
"dos" \
"en" \
"to" \
"fem"
mailbox_prog_command "ins before dwa zero jeden"
mailbox_prog_test "print" \
"# items: 17" \
"1" \
"2" \
"3" \
"4" \
"5" \
"6" \
"zero" \
"jeden" \
"dwa" \
"zero" \
"jeden" \
"cero" \
"un" \
"dos" \
"en" \
"to" \
"fem"
mailbox_prog_test "ictl tell" "12"
prompt_text "dos"
mailbox_prog_test "ictl del"
prompt_text "dos"
mailbox_prog_test "next"
mailbox_prog_test "print" \
"# items: 16" \
"1" \
"2" \
"3" \
"4" \
"5" \
"6" \
"zero" \
"jeden" \
"dwa" \
"zero" \
"jeden" \
"cero" \
"dos" \
"en" \
"to" \
"fem"
mailbox_prog_test "ictl ins seis"
mailbox_prog_test "print" \
"# items: 17" \
"1" \
"2" \
"3" \
"4" \
"5" \
"6" \
"zero" \
"jeden" \
"dwa" \
"zero" \
"jeden" \
"cero" \
"dos" \
"seis" \
"en" \
"to" \
"fem"
mailbox_prog_test "ictl ins tres quatro cinco"
mailbox_prog_test "print" \
"# items: 20" \
"1" \
"2" \
"3" \
"4" \
"5" \
"6" \
"zero" \
"jeden" \
"dwa" \
"zero" \
"jeden" \
"cero" \
"dos" \
"tres" \
"quatro" \
"cinco" \
"seis" \
"en" \
"to" \
"fem"
prompt_text "tres"
mailbox_prog_test "next"
mailbox_prog_test "ictl dir" "forwards"
mailbox_prog_test "ictl dir backwards"
prompt_text "dos"
mailbox_prog_test "next"
prompt_text "dwa"
mailbox_prog_test "next 4"
prompt_text "jeden"
mailbox_prog_test "ictl del"
mailbox_prog_test "next"
prompt_text "zero"
mailbox_prog_test "next"
mailbox_prog_test "ictl dir forwards"
prompt_text "jeden"
mailbox_prog_test "next"
mailbox_prog_send "quit"
mailbox_prog_stop
# End of list.exp
# -*- tcl -*-
# This file is part of Mailutils testsuite.
# Copyright (C) 2002, 2007, 2010 Free Software Foundation, Inc.
#
# This program 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 of the License, 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 this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301 USA.
mu_prepare_spools
set mailcapfile ${MU_DATA_DIR}/mailcap
set chan [open ${srcdir}/Mailcap r]
set outchan [open "$mailcapfile" w]
set command ""
set state 0
set entry 0
set pattern [list]
for {gets $chan line} {![eof $chan]} {gets $chan line} {
if {$state == 0} {
switch -regexp -- "$line" {
"^#.*" { }
"^entry" {
set state 1
incr entry
lappend pattern "entry\[${entry}\]"
}
default {
puts $outchan $line
}
}
} else {
switch -regexp -- "$line" {
"^#.*" { }
"^\$" {
lappend pattern ""
set state 0
}
default {
lappend pattern $line
}
}
}
}
if {$state == 1} {
lappend pattern ""
}
close $outchan
close $chan
set MU_TOOL ${top_builddir}/examples/mailcap
set MU_TOOL_FLAGS ""
verbose "INVOKE $pattern"
eval mu_exec -message "mailcap" -arg "$mailcapfile" $pattern
# end of mailcap.exp
# -*- tcl -*-
# This file is part of Mailutils testsuite.
# Copyright (C) 2002, 2007, 2010 Free Software Foundation, Inc.
#
# This program 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 of the License, 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 this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301 USA.
set MU_TOOL "${top_builddir}/examples/mimetest"
set MU_TOOL_FLAGS "-i 0 -p $MU_SPOOL_DIR/mbox1"
mu_prepare_spools
set chan [open ${srcdir}/Mime r]
set pattern [list]
for {gets $chan line} {![eof $chan]} {gets $chan line} {
switch -regexp -- "$line" {
"^#.*" { }
default { set pattern [concat $pattern [list $line]] }
}
}
mu_exec -retcode 0 -message "MIME" -pattern $pattern
close $chan
# end of mime.exp
# -*- tcl -*-
# This file is part of Mailutils testsuite.
# Copyright (C) 2002, 2007, 2010 Free Software Foundation, Inc.
#
# This program 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 of the License, 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 this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301 USA.
mailbox_run ${top_builddir}/examples/url-parse
set chan [open ${srcdir}/Urls r]
set command ""
for {gets $chan line} {![eof $chan]} {gets $chan line} {
verbose "LINE: $line"
switch -regexp -- "$line" {
"^#.*" { }
"^[^ \t].*=>.*" {
regexp "(.*\[^ \t\])\[ \t\]*=>.*" $line dummy command
verbose "COMMAND: \"$command\""
set pattern [list $line]
}
"^\$" {
if {$command != ""} {
mailbox_test -pattern $pattern $command
set command ""
}
}
default {
set pattern [concat $pattern [list $line]]
}
}
}
close $chan
# end of url.exp
......@@ -23,7 +23,7 @@ MAINTAINERCLEANFILES = Makefile.in $(TESTSUITE)
## ------------ ##
$(srcdir)/package.m4: $(top_srcdir)/configure.ac
{ \
$(AM_V_GEN) { \
echo '# Signature of the current package.'; \
echo 'm4_define([AT_PACKAGE_NAME], [@PACKAGE_NAME@])'; \
echo 'm4_define([AT_PACKAGE_TARNAME], [@PACKAGE_TARNAME@])'; \
......
......@@ -16,7 +16,6 @@
# This file is part of Mailfromd testsuite.
# Require a reasonably recent autotest.
m4_version_prereq([2.52g])
m4_include([testsuite.inc])
dnl ------------------------------------------------------------
......
......@@ -24,7 +24,7 @@ MAINTAINERCLEANFILES = Makefile.in $(TESTSUITE)
## ------------ ##
$(srcdir)/package.m4: $(top_srcdir)/configure.ac
{ \
$(AM_V_GEN) { \
echo '# Signature of the current package.'; \
echo 'm4_define([AT_PACKAGE_NAME], [@PACKAGE_NAME@])'; \
echo 'm4_define([AT_PACKAGE_TARNAME], [@PACKAGE_TARNAME@])'; \
......
......@@ -15,8 +15,7 @@
# 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 testcompile(SCRIPT) -- test compilation of the Sieve SCRIPT
......
......@@ -15,6 +15,6 @@
# along with GNU Mailutils. If not, see <http://www.gnu.org/licenses/>.
# This file is part of Mailfromd testsuite.
m4_include([testsuite.inc])
dnl m4_include([testsuite.inc])
MUT_VERSION(sieve)
......
......@@ -15,6 +15,11 @@
# 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_define([AT_SKIP_TEST],[exit 77])
dnl ------------------------------------------------------------
dnl MUT_VERSION(TOOL) -- checks the version output from TOOL
dnl
......@@ -38,5 +43,3 @@ _EOT
AT_CLEANUP
])
m4_define([AT_SKIP_TEST],[exit 77])
......