commit-mailutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SCM] GNU Mailutils branch, master, updated. release-2.2-76-g3397a3a


From: Sergey Poznyakoff
Subject: [SCM] GNU Mailutils branch, master, updated. release-2.2-76-g3397a3a
Date: Tue, 14 Sep 2010 22:10:47 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Mailutils".

http://git.savannah.gnu.org/cgit/mailutils.git/commit/?id=3397a3ae738cd7f1dfc8820c6575b241394f7c85

The branch, master has been updated
       via  3397a3ae738cd7f1dfc8820c6575b241394f7c85 (commit)
       via  548d50fb19cd66dbe153e4d7e879501bab58c0aa (commit)
       via  7b79a6edcda94d4224bc4cbbe47cb6dcf2ea42db (commit)
      from  d1d548e1473e5e87e42df174110d57a05b9402d1 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 3397a3ae738cd7f1dfc8820c6575b241394f7c85
Author: Sergey Poznyakoff <address@hidden>
Date:   Wed Sep 15 01:08:00 2010 +0300

    Rewrite testsuite for messages in Autotest.
    
    * configure.ac: Remove messages/testsuite
    * messages/Makefile.am (SUBDIRS): Replace testsuite with tests.
    * messages/tests/.gitignore: New file.
    * messages/tests/Makefile.am: New file.
    * messages/tests/atlocal.in: New file.
    * messages/tests/testsuite.at: New file.
    * messages/testsuite: Remove.

commit 548d50fb19cd66dbe153e4d7e879501bab58c0aa
Author: Sergey Poznyakoff <address@hidden>
Date:   Wed Sep 15 00:38:16 2010 +0300

    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.

commit 7b79a6edcda94d4224bc4cbbe47cb6dcf2ea42db
Author: Sergey Poznyakoff <address@hidden>
Date:   Tue Sep 14 14:59:17 2010 +0300

    Rename mailbox/ to libmailutils/.
    
    This change has been waiting since 2005-08-16 (aaab88142c8193f1),
    when libmailbox had been renamed to libmailutils.  Back then MU
    was still under CVS, which didn't like renames.

-----------------------------------------------------------------------

Summary of changes:
 Makefile.am                                        |    2 +-
 configure.ac                                       |   20 +-
 examples/Makefile.am                               |   17 +-
 frm/tests/Makefile.am                              |    2 +-
 frm/tests/testsuite.at                             |    7 +-
 include/mailutils/Makefile.am                      |    2 +-
 {mailbox => libmailutils}/.gitignore               |    0
 {mailbox => libmailutils}/Makefile.am              |    4 +-
 {mailbox => libmailutils}/acl.c                    |    0
 {mailbox => libmailutils}/address.c                |    0
 {mailbox => libmailutils}/alloc.c                  |    0
 {mailbox => libmailutils}/amd.c                    |    0
 {mailbox => libmailutils}/argcv.c                  |    0
 {mailbox => libmailutils}/asnprintf.c              |    0
 {mailbox => libmailutils}/asprintf.c               |    0
 {mailbox => libmailutils}/assoc.c                  |    0
 {mailbox => libmailutils}/attachment.c             |    0
 {mailbox => libmailutils}/attribute.c              |    0
 {mailbox => libmailutils}/auth.c                   |    0
 {mailbox => libmailutils}/base64.c                 |    0
 {mailbox => libmailutils}/binflt.c                 |    0
 {mailbox => libmailutils}/body.c                   |    0
 {mailbox => libmailutils}/cfg_driver.c             |    0
 {mailbox => libmailutils}/cfg_format.c             |    0
 {mailbox => libmailutils}/cfg_lexer.l              |    0
 {mailbox => libmailutils}/cfg_parser.y             |    0
 {mailbox => libmailutils}/crlfdot.c                |    0
 {mailbox => libmailutils}/crlfflt.c                |    0
 {mailbox => libmailutils}/cstrcasecmp.c            |    0
 {mailbox => libmailutils}/cstrlower.c              |    0
 {mailbox => libmailutils}/cstrupper.c              |    0
 {mailbox => libmailutils}/daemon.c                 |    0
 {mailbox => libmailutils}/date.c                   |    0
 {mailbox => libmailutils}/dbgstderr.c              |    0
 {mailbox => libmailutils}/dbgstream.c              |    0
 {mailbox => libmailutils}/dbgsyslog.c              |    0
 {mailbox => libmailutils}/debug.c                  |    0
 {mailbox => libmailutils}/diag.c                   |    0
 {mailbox => libmailutils}/dot.c                    |    0
 {mailbox => libmailutils}/envelope.c               |    0
 {mailbox => libmailutils}/errors                   |    0
 {mailbox => libmailutils}/fgetpwent.c              |    0
 {mailbox => libmailutils}/file_stream.c            |    0
 {mailbox => libmailutils}/filter.c                 |    0
 {mailbox => libmailutils}/filter_iconv.c           |    0
 {mailbox => libmailutils}/fltstream.c              |    0
 {mailbox => libmailutils}/folder.c                 |    0
 {mailbox => libmailutils}/freeitem.c               |    0
 {mailbox => libmailutils}/gdebug.c                 |    0
 {mailbox => libmailutils}/gocs.c                   |    0
 {mailbox => libmailutils}/hdritr.c                 |    0
 {mailbox => libmailutils}/header.c                 |    0
 {mailbox => libmailutils}/iostream.c               |    0
 {mailbox => libmailutils}/ipsrv.c                  |    0
 {mailbox => libmailutils}/iterator.c               |    0
 {mailbox => libmailutils}/kwd.c                    |    0
 {mailbox => libmailutils}/linelenflt.c             |    0
 {mailbox => libmailutils}/list.c                   |    0
 {mailbox => libmailutils}/listlist.c               |    0
 {mailbox => libmailutils}/locale.c                 |    0
 {mailbox => libmailutils}/locker.c                 |    0
 {mailbox => libmailutils}/mailbox.c                |    0
 {mailbox => libmailutils}/mailcap.c                |    0
 {mailbox => libmailutils}/mailer.c                 |    0
 {mailbox => libmailutils}/mapfile_stream.c         |    0
 {mailbox => libmailutils}/mbx_default.c            |    0
 {mailbox => libmailutils}/mbxitr.c                 |    0
 {mailbox => libmailutils}/md5.c                    |    0
 {mailbox => libmailutils}/memory_stream.c          |    0
 {mailbox => libmailutils}/message.c                |    0
 {mailbox => libmailutils}/message_stream.c         |    0
 {mailbox => libmailutils}/mime.c                   |    0
 {mailbox => libmailutils}/mimehdr.c                |    0
 {mailbox => libmailutils}/mkfilename.c             |    0
 {mailbox => libmailutils}/monitor.c                |    0
 {mailbox => libmailutils}/msgscan.c                |    0
 {mailbox => libmailutils}/msrv.c                   |    0
 {mailbox => libmailutils}/mu_auth.c                |    0
 {mailbox => libmailutils}/muctype.c                |    0
 {mailbox => libmailutils}/muerrno.cin              |    0
 {mailbox => libmailutils}/muerror.c                |    0
 {mailbox => libmailutils}/munre.c                  |    0
 {mailbox => libmailutils}/mutil.c                  |    0
 {mailbox => libmailutils}/nls.c                    |    0
 {mailbox => libmailutils}/nullrec.c                |    0
 {mailbox => libmailutils}/observer.c               |    0
 {mailbox => libmailutils}/opool.c                  |    0
 {mailbox => libmailutils}/parse822.c               |    0
 {mailbox => libmailutils}/parsedate.y              |    0
 {mailbox => libmailutils}/permstr.c                |    0
 {mailbox => libmailutils}/prog_stream.c            |    0
 {mailbox => libmailutils}/progmailer.c             |    0
 {mailbox => libmailutils}/property.c               |    0
 {mailbox => libmailutils}/qpflt.c                  |    0
 {mailbox => libmailutils}/rdcache_stream.c         |    0
 {mailbox => libmailutils}/refcount.c               |    0
 {mailbox => libmailutils}/registrar.c              |    0
 {mailbox => libmailutils}/rfc2047.c                |    0
 {mailbox => libmailutils}/secret.c                 |    0
 {mailbox => libmailutils}/server.c                 |    0
 {mailbox => libmailutils}/sha1.c                   |    0
 {mailbox => libmailutils}/size_max.h               |    0
 {mailbox => libmailutils}/socket_stream.c          |    0
 {mailbox => libmailutils}/stdio_stream.c           |    0
 {mailbox => libmailutils}/stream.c                 |    0
 {mailbox => libmailutils}/stream_printf.c          |    0
 {mailbox => libmailutils}/stream_vprintf.c         |    0
 {mailbox => libmailutils}/streamcpy.c              |    0
 {mailbox => libmailutils}/streamref.c              |    0
 {mailbox => libmailutils}/stripws.c                |    0
 {mailbox => libmailutils}/strltrim.c               |    0
 {mailbox => libmailutils}/strrtrim.c               |    0
 {mailbox => libmailutils}/strskip.c                |    0
 {mailbox => libmailutils}/syslog.c                 |    0
 {mailbox => libmailutils}/system.c                 |    0
 {mailbox => libmailutils}/tcp.c                    |    0
 {mailbox => libmailutils}/temp_file_stream.c       |    0
 {mailbox/testsuite => libmailutils/tests}/Decode   |    0
 {mailbox/testsuite => libmailutils/tests}/Encode   |  Bin 256 -> 256 bytes
 {readmsg => libmailutils}/tests/Makefile.am        |   40 +-
 libmailutils/tests/addr.c                          |  103 ++
 libmailutils/tests/address.at                      | 1080 ++++++++++++++++++++
 libmailutils/tests/argcv.at                        |   91 ++
 {examples => libmailutils/tests}/argcv.c           |    0
 {readmsg => libmailutils}/tests/atlocal.in         |    4 +-
 .../tests/ext.at => libmailutils/tests/base64d.at  |   33 +-
 .../tests/ext.at => libmailutils/tests/base64e.at  |   35 +-
 libmailutils/tests/decode2047.at                   |   60 ++
 {examples => libmailutils/tests}/decode2047.c      |    5 +-
 .../tests/encode2047.at                            |   21 +-
 {examples => libmailutils/tests}/encode2047.c      |    5 +-
 examples/base64.c => libmailutils/tests/fltst.c    |  152 ++--
 libmailutils/tests/mailcap.at                      |  279 +++++
 {examples => libmailutils/tests}/mailcap.c         |    0
 .../testsuite/Mime => libmailutils/tests/mime.at   |   54 +-
 {examples => libmailutils/tests}/mimetest.c        |    0
 .../version.at => libmailutils/tests/testsuite.at  |   12 +-
 {examples => libmailutils/tests}/url-parse.c       |   16 +-
 libmailutils/tests/url.at                          |  776 ++++++++++++++
 {mailbox => libmailutils}/ticket.c                 |    0
 {mailbox => libmailutils}/url.c                    |    0
 {mailbox => libmailutils}/vartab.c                 |    0
 {mailbox => libmailutils}/vasnprintf.c             |    0
 {mailbox => libmailutils}/version.c                |    0
 {mailbox => libmailutils}/wicket.c                 |    0
 {mailbox => libmailutils}/xscript-stream.c         |    0
 mailbox/testsuite/.gitignore                       |    7 -
 mailbox/testsuite/Addrs                            |  644 ------------
 mailbox/testsuite/Argcv                            |   52 -
 mailbox/testsuite/Decode2047                       |   36 -
 mailbox/testsuite/Encode2047                       |   27 -
 mailbox/testsuite/Mailcap                          |  195 ----
 mailbox/testsuite/Makefile.am                      |   92 --
 mailbox/testsuite/Urls                             |  629 ------------
 mailbox/testsuite/lib/DISTFILES                    |    1 -
 mailbox/testsuite/lib/mailbox.exp                  |  243 -----
 mailbox/testsuite/mailbox/DISTFILES                |    9 -
 mailbox/testsuite/mailbox/address.exp              |   48 -
 mailbox/testsuite/mailbox/argcv.exp                |   55 -
 mailbox/testsuite/mailbox/base64.exp               |   37 -
 mailbox/testsuite/mailbox/decode2047.exp           |   50 -
 mailbox/testsuite/mailbox/encode2047.exp           |   62 --
 mailbox/testsuite/mailbox/list.exp                 |  330 ------
 mailbox/testsuite/mailbox/mailcap.exp              |   71 --
 mailbox/testsuite/mailbox/mime.exp                 |   39 -
 mailbox/testsuite/mailbox/url.exp                  |   48 -
 messages/Makefile.am                               |    2 +-
 {frm => messages}/tests/.gitignore                 |    1 -
 {frm => messages}/tests/Makefile.am                |    2 +-
 {readmsg => messages}/tests/atlocal.in             |    4 +-
 {readmsg => messages}/tests/testsuite.at           |   48 +-
 messages/testsuite/.gitignore                      |    7 -
 messages/testsuite/Makefile.am                     |   89 --
 messages/testsuite/messages/DISTFILES              |    1 -
 messages/testsuite/messages/test.exp               |   38 -
 readmsg/tests/Makefile.am                          |    2 +-
 readmsg/tests/testsuite.at                         |    1 -
 sieve/tests/Makefile.am                            |    2 +-
 sieve/tests/testsuite.at                           |    3 +-
 sieve/tests/version.at                             |    2 +-
 testsuite/testsuite.inc                            |    7 +-
 181 files changed, 2668 insertions(+), 3036 deletions(-)
 rename {mailbox => libmailutils}/.gitignore (100%)
 rename {mailbox => libmailutils}/Makefile.am (97%)
 rename {mailbox => libmailutils}/acl.c (100%)
 rename {mailbox => libmailutils}/address.c (100%)
 rename {mailbox => libmailutils}/alloc.c (100%)
 rename {mailbox => libmailutils}/amd.c (100%)
 rename {mailbox => libmailutils}/argcv.c (100%)
 rename {mailbox => libmailutils}/asnprintf.c (100%)
 rename {mailbox => libmailutils}/asprintf.c (100%)
 rename {mailbox => libmailutils}/assoc.c (100%)
 rename {mailbox => libmailutils}/attachment.c (100%)
 rename {mailbox => libmailutils}/attribute.c (100%)
 rename {mailbox => libmailutils}/auth.c (100%)
 rename {mailbox => libmailutils}/base64.c (100%)
 rename {mailbox => libmailutils}/binflt.c (100%)
 rename {mailbox => libmailutils}/body.c (100%)
 rename {mailbox => libmailutils}/cfg_driver.c (100%)
 rename {mailbox => libmailutils}/cfg_format.c (100%)
 rename {mailbox => libmailutils}/cfg_lexer.l (100%)
 rename {mailbox => libmailutils}/cfg_parser.y (100%)
 rename {mailbox => libmailutils}/crlfdot.c (100%)
 rename {mailbox => libmailutils}/crlfflt.c (100%)
 rename {mailbox => libmailutils}/cstrcasecmp.c (100%)
 rename {mailbox => libmailutils}/cstrlower.c (100%)
 rename {mailbox => libmailutils}/cstrupper.c (100%)
 rename {mailbox => libmailutils}/daemon.c (100%)
 rename {mailbox => libmailutils}/date.c (100%)
 rename {mailbox => libmailutils}/dbgstderr.c (100%)
 rename {mailbox => libmailutils}/dbgstream.c (100%)
 rename {mailbox => libmailutils}/dbgsyslog.c (100%)
 rename {mailbox => libmailutils}/debug.c (100%)
 rename {mailbox => libmailutils}/diag.c (100%)
 rename {mailbox => libmailutils}/dot.c (100%)
 rename {mailbox => libmailutils}/envelope.c (100%)
 rename {mailbox => libmailutils}/errors (100%)
 rename {mailbox => libmailutils}/fgetpwent.c (100%)
 rename {mailbox => libmailutils}/file_stream.c (100%)
 rename {mailbox => libmailutils}/filter.c (100%)
 rename {mailbox => libmailutils}/filter_iconv.c (100%)
 rename {mailbox => libmailutils}/fltstream.c (100%)
 rename {mailbox => libmailutils}/folder.c (100%)
 rename {mailbox => libmailutils}/freeitem.c (100%)
 rename {mailbox => libmailutils}/gdebug.c (100%)
 rename {mailbox => libmailutils}/gocs.c (100%)
 rename {mailbox => libmailutils}/hdritr.c (100%)
 rename {mailbox => libmailutils}/header.c (100%)
 rename {mailbox => libmailutils}/iostream.c (100%)
 rename {mailbox => libmailutils}/ipsrv.c (100%)
 rename {mailbox => libmailutils}/iterator.c (100%)
 rename {mailbox => libmailutils}/kwd.c (100%)
 rename {mailbox => libmailutils}/linelenflt.c (100%)
 rename {mailbox => libmailutils}/list.c (100%)
 rename {mailbox => libmailutils}/listlist.c (100%)
 rename {mailbox => libmailutils}/locale.c (100%)
 rename {mailbox => libmailutils}/locker.c (100%)
 rename {mailbox => libmailutils}/mailbox.c (100%)
 rename {mailbox => libmailutils}/mailcap.c (100%)
 rename {mailbox => libmailutils}/mailer.c (100%)
 rename {mailbox => libmailutils}/mapfile_stream.c (100%)
 rename {mailbox => libmailutils}/mbx_default.c (100%)
 rename {mailbox => libmailutils}/mbxitr.c (100%)
 rename {mailbox => libmailutils}/md5.c (100%)
 rename {mailbox => libmailutils}/memory_stream.c (100%)
 rename {mailbox => libmailutils}/message.c (100%)
 rename {mailbox => libmailutils}/message_stream.c (100%)
 rename {mailbox => libmailutils}/mime.c (100%)
 rename {mailbox => libmailutils}/mimehdr.c (100%)
 rename {mailbox => libmailutils}/mkfilename.c (100%)
 rename {mailbox => libmailutils}/monitor.c (100%)
 rename {mailbox => libmailutils}/msgscan.c (100%)
 rename {mailbox => libmailutils}/msrv.c (100%)
 rename {mailbox => libmailutils}/mu_auth.c (100%)
 rename {mailbox => libmailutils}/muctype.c (100%)
 rename {mailbox => libmailutils}/muerrno.cin (100%)
 rename {mailbox => libmailutils}/muerror.c (100%)
 rename {mailbox => libmailutils}/munre.c (100%)
 rename {mailbox => libmailutils}/mutil.c (100%)
 rename {mailbox => libmailutils}/nls.c (100%)
 rename {mailbox => libmailutils}/nullrec.c (100%)
 rename {mailbox => libmailutils}/observer.c (100%)
 rename {mailbox => libmailutils}/opool.c (100%)
 rename {mailbox => libmailutils}/parse822.c (100%)
 rename {mailbox => libmailutils}/parsedate.y (100%)
 rename {mailbox => libmailutils}/permstr.c (100%)
 rename {mailbox => libmailutils}/prog_stream.c (100%)
 rename {mailbox => libmailutils}/progmailer.c (100%)
 rename {mailbox => libmailutils}/property.c (100%)
 rename {mailbox => libmailutils}/qpflt.c (100%)
 rename {mailbox => libmailutils}/rdcache_stream.c (100%)
 rename {mailbox => libmailutils}/refcount.c (100%)
 rename {mailbox => libmailutils}/registrar.c (100%)
 rename {mailbox => libmailutils}/rfc2047.c (100%)
 rename {mailbox => libmailutils}/secret.c (100%)
 rename {mailbox => libmailutils}/server.c (100%)
 rename {mailbox => libmailutils}/sha1.c (100%)
 rename {mailbox => libmailutils}/size_max.h (100%)
 rename {mailbox => libmailutils}/socket_stream.c (100%)
 rename {mailbox => libmailutils}/stdio_stream.c (100%)
 rename {mailbox => libmailutils}/stream.c (100%)
 rename {mailbox => libmailutils}/stream_printf.c (100%)
 rename {mailbox => libmailutils}/stream_vprintf.c (100%)
 rename {mailbox => libmailutils}/streamcpy.c (100%)
 rename {mailbox => libmailutils}/streamref.c (100%)
 rename {mailbox => libmailutils}/stripws.c (100%)
 rename {mailbox => libmailutils}/strltrim.c (100%)
 rename {mailbox => libmailutils}/strrtrim.c (100%)
 rename {mailbox => libmailutils}/strskip.c (100%)
 rename {mailbox => libmailutils}/syslog.c (100%)
 rename {mailbox => libmailutils}/system.c (100%)
 rename {mailbox => libmailutils}/tcp.c (100%)
 rename {mailbox => libmailutils}/temp_file_stream.c (100%)
 rename {mailbox/testsuite => libmailutils/tests}/Decode (100%)
 rename {mailbox/testsuite => libmailutils/tests}/Encode (100%)
 copy {readmsg => libmailutils}/tests/Makefile.am (78%)
 create mode 100644 libmailutils/tests/addr.c
 create mode 100644 libmailutils/tests/address.at
 create mode 100644 libmailutils/tests/argcv.at
 rename {examples => libmailutils/tests}/argcv.c (100%)
 copy {readmsg => libmailutils}/tests/atlocal.in (77%)
 copy sieve/tests/ext.at => libmailutils/tests/base64d.at (64%)
 copy sieve/tests/ext.at => libmailutils/tests/base64e.at (64%)
 create mode 100644 libmailutils/tests/decode2047.at
 rename {examples => libmailutils/tests}/decode2047.c (96%)
 copy sieve/tests/envelope.at => libmailutils/tests/encode2047.at (76%)
 rename {examples => libmailutils/tests}/encode2047.c (98%)
 copy examples/base64.c => libmailutils/tests/fltst.c (61%)
 create mode 100644 libmailutils/tests/mailcap.at
 rename {examples => libmailutils/tests}/mailcap.c (100%)
 rename mailbox/testsuite/Mime => libmailutils/tests/mime.at (83%)
 rename {examples => libmailutils/tests}/mimetest.c (100%)
 copy sieve/tests/version.at => libmailutils/tests/testsuite.at (78%)
 rename {examples => libmailutils/tests}/url-parse.c (89%)
 create mode 100644 libmailutils/tests/url.at
 rename {mailbox => libmailutils}/ticket.c (100%)
 rename {mailbox => libmailutils}/url.c (100%)
 rename {mailbox => libmailutils}/vartab.c (100%)
 rename {mailbox => libmailutils}/vasnprintf.c (100%)
 rename {mailbox => libmailutils}/version.c (100%)
 rename {mailbox => libmailutils}/wicket.c (100%)
 rename {mailbox => libmailutils}/xscript-stream.c (100%)
 delete mode 100644 mailbox/testsuite/.gitignore
 delete mode 100644 mailbox/testsuite/Addrs
 delete mode 100644 mailbox/testsuite/Argcv
 delete mode 100644 mailbox/testsuite/Decode2047
 delete mode 100644 mailbox/testsuite/Encode2047
 delete mode 100644 mailbox/testsuite/Mailcap
 delete mode 100644 mailbox/testsuite/Makefile.am
 delete mode 100644 mailbox/testsuite/Urls
 delete mode 100644 mailbox/testsuite/lib/DISTFILES
 delete mode 100644 mailbox/testsuite/lib/mailbox.exp
 delete mode 100644 mailbox/testsuite/mailbox/DISTFILES
 delete mode 100644 mailbox/testsuite/mailbox/address.exp
 delete mode 100644 mailbox/testsuite/mailbox/argcv.exp
 delete mode 100644 mailbox/testsuite/mailbox/base64.exp
 delete mode 100644 mailbox/testsuite/mailbox/decode2047.exp
 delete mode 100644 mailbox/testsuite/mailbox/encode2047.exp
 delete mode 100644 mailbox/testsuite/mailbox/list.exp
 delete mode 100644 mailbox/testsuite/mailbox/mailcap.exp
 delete mode 100644 mailbox/testsuite/mailbox/mime.exp
 delete mode 100644 mailbox/testsuite/mailbox/url.exp
 copy {frm => messages}/tests/.gitignore (86%)
 copy {frm => messages}/tests/Makefile.am (97%)
 copy {readmsg => messages}/tests/atlocal.in (76%)
 copy {readmsg => messages}/tests/testsuite.at (62%)
 delete mode 100644 messages/testsuite/.gitignore
 delete mode 100644 messages/testsuite/Makefile.am
 delete mode 100644 messages/testsuite/messages/DISTFILES
 delete mode 100644 messages/testsuite/messages/test.exp

diff --git a/Makefile.am b/Makefile.am
index 81aefd2..86c26cd 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -94,7 +94,7 @@ SUBDIRS = . \
  include\
  po\
  testsuite\
- mailbox\
+ libmailutils\
  sql\
  libmu_auth\
  libproto\
diff --git a/configure.ac b/configure.ac
index c7babe7..59ced52 100644
--- a/configure.ac
+++ b/configure.ac
@@ -19,7 +19,7 @@ dnl Inc. 51 Franklin Street, Fifth Floor, Boston, MA 
02110-1301 USA
 
 AC_PREREQ(2.63)
 AC_INIT([GNU Mailutils], [2.2.90], address@hidden, [mailutils])
-AC_CONFIG_SRCDIR([mailbox/mailbox.c])
+AC_CONFIG_SRCDIR([libmailutils/mailbox.c])
 AC_CONFIG_AUX_DIR([build-aux])
 AM_INIT_AUTOMAKE([gnits 1.11 dist-bzip2 dist-lzma dist-xz std-options 
silent-rules])
 AC_CONFIG_HEADERS([config.h])
@@ -38,7 +38,7 @@ AC_SUBST(VI_AGE,      1)
 
 dnl Library paths
 AC_SUBST(MU_LIB_AUTH,'${top_builddir}/libmu_auth/libmu_auth.la')
-AC_SUBST(MU_LIB_MAILUTILS,'${top_builddir}/mailbox/libmailutils.la')
+AC_SUBST(MU_LIB_MAILUTILS,'${top_builddir}/libmailutils/libmailutils.la')
 AC_SUBST(MU_LIB_SQL,'${top_builddir}/sql/libsql.la')
 AC_SUBST(MU_LIB_IMAP)
 AC_SUBST(MU_LIB_MAILDIR)
@@ -69,9 +69,9 @@ AC_SUBST(MU_APP_LIBRARIES,'../libmu_argp/libmu_argp.a 
../libmu_cfg/libmu_cfg.la
 # header files. There are two exceptions, though. See NOTE before the
 # AC_CONFIG_LINKS statements, below.
 
-AC_SUBST(MU_LIB_COMMON_INCLUDES,'-I${top_builddir} -I${top_srcdir}/include  
-I${top_builddir}/include -I${top_srcdir}/mailbox')
+AC_SUBST(MU_LIB_COMMON_INCLUDES,'-I${top_builddir} -I${top_srcdir}/include  
-I${top_builddir}/include')
 
-AC_SUBST(MU_APP_COMMON_INCLUDES,'-I${srcdir} -I${top_srcdir}/include 
-I${top_srcdir}/lib -I${top_builddir}/lib -I${top_builddir} 
-I${top_builddir}/include -I${top_srcdir}/mailbox -I${top_srcdir}/libmu_argp 
-I${top_srcdir}/libmu_cfg')
+AC_SUBST(MU_APP_COMMON_INCLUDES,'-I${srcdir} -I${top_srcdir}/include 
-I${top_srcdir}/lib -I${top_builddir}/lib -I${top_builddir} 
-I${top_builddir}/include -I${top_srcdir}/libmu_argp -I${top_srcdir}/libmu_cfg')
 
 dnl Check for programs
 AC_PROG_CC
@@ -112,7 +112,7 @@ AC_CHECK_TYPE(iconv_t,:,
 
 # NOTE: Generally speaking, Mailutils libraries are not allowed to include
 # gnulib headers.  The only exceptions are: gettext.h, which is needed for
-# proper i18n, and intprops.h, which is used in mailbox/cfg_parser.y.
+# proper i18n, and intprops.h, which is used in libmailutils/cfg_parser.y.
 # This latter will probably be rewritten to remove the need for intprops.h.
 #
 # To make these two headers accessible for the libraries, they are linked
@@ -1211,8 +1211,12 @@ 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
+                messages/tests/Makefile
+                messages/tests/atlocal
                 readmsg/tests/Makefile
                 readmsg/tests/atlocal
                  sieve/tests/Makefile
@@ -1361,10 +1365,8 @@ AC_CONFIG_FILES([
  maidag/Makefile
  mail/Makefile
  mail/testsuite/Makefile
- mailbox/Makefile
- mailbox/testsuite/Makefile
+ libmailutils/Makefile
  messages/Makefile
- messages/testsuite/Makefile
  mh/Makefile
  mimeview/Makefile
  movemail/Makefile
diff --git a/examples/Makefile.am b/examples/Makefile.am
index 7e858d7..c283d0d 100644
--- a/examples/Makefile.am
+++ b/examples/Makefile.am
@@ -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}\
- @address@hidden
- ${MU_LIB_MAILUTILS}
-
 msg_send_LDADD =\
  ../lib/libmuaux.la\
  ${MU_LIB_MAILER}\
diff --git a/frm/tests/Makefile.am b/frm/tests/Makefile.am
index 647d108..be7ac10 100644
--- a/frm/tests/Makefile.am
+++ b/frm/tests/Makefile.am
@@ -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],      address@hidden@])'; \
          echo 'm4_define([AT_PACKAGE_TARNAME],   address@hidden@])'; \
diff --git a/frm/tests/testsuite.at b/frm/tests/testsuite.at
index eae8fc1..0afd415 100644
--- a/frm/tests/testsuite.at
+++ b/frm/tests/testsuite.at
@@ -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],
diff --git a/include/mailutils/Makefile.am b/include/mailutils/Makefile.am
index 098a9fa..9839c0a 100644
--- a/include/mailutils/Makefile.am
+++ b/include/mailutils/Makefile.am
@@ -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
diff --git a/mailbox/.gitignore b/libmailutils/.gitignore
similarity index 100%
rename from mailbox/.gitignore
rename to libmailutils/.gitignore
diff --git a/mailbox/Makefile.am b/libmailutils/Makefile.am
similarity index 97%
rename from mailbox/Makefile.am
rename to libmailutils/Makefile.am
index a4cbc49..ea8d738 100644
--- a/mailbox/Makefile.am
+++ b/libmailutils/Makefile.am
@@ -18,13 +18,13 @@
 ##   Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA
 ##   02110-1301 USA
 
-INCLUDES = @MU_LIB_COMMON_INCLUDES@
+INCLUDES = @MU_LIB_COMMON_INCLUDES@ -I${top_srcdir}/libmailutils
 
 YLWRAP = $(SHELL) $(mu_aux_dir)/gylwrap
 AM_YFLAGS=-vt
 AM_LFLAGS=-dvp
 
-SUBDIRS = testsuite 
+SUBDIRS = tests 
 
 lib_LTLIBRARIES = libmailutils.la
 
diff --git a/mailbox/acl.c b/libmailutils/acl.c
similarity index 100%
rename from mailbox/acl.c
rename to libmailutils/acl.c
diff --git a/mailbox/address.c b/libmailutils/address.c
similarity index 100%
rename from mailbox/address.c
rename to libmailutils/address.c
diff --git a/mailbox/alloc.c b/libmailutils/alloc.c
similarity index 100%
rename from mailbox/alloc.c
rename to libmailutils/alloc.c
diff --git a/mailbox/amd.c b/libmailutils/amd.c
similarity index 100%
rename from mailbox/amd.c
rename to libmailutils/amd.c
diff --git a/mailbox/argcv.c b/libmailutils/argcv.c
similarity index 100%
rename from mailbox/argcv.c
rename to libmailutils/argcv.c
diff --git a/mailbox/asnprintf.c b/libmailutils/asnprintf.c
similarity index 100%
rename from mailbox/asnprintf.c
rename to libmailutils/asnprintf.c
diff --git a/mailbox/asprintf.c b/libmailutils/asprintf.c
similarity index 100%
rename from mailbox/asprintf.c
rename to libmailutils/asprintf.c
diff --git a/mailbox/assoc.c b/libmailutils/assoc.c
similarity index 100%
rename from mailbox/assoc.c
rename to libmailutils/assoc.c
diff --git a/mailbox/attachment.c b/libmailutils/attachment.c
similarity index 100%
rename from mailbox/attachment.c
rename to libmailutils/attachment.c
diff --git a/mailbox/attribute.c b/libmailutils/attribute.c
similarity index 100%
rename from mailbox/attribute.c
rename to libmailutils/attribute.c
diff --git a/mailbox/auth.c b/libmailutils/auth.c
similarity index 100%
rename from mailbox/auth.c
rename to libmailutils/auth.c
diff --git a/mailbox/base64.c b/libmailutils/base64.c
similarity index 100%
rename from mailbox/base64.c
rename to libmailutils/base64.c
diff --git a/mailbox/binflt.c b/libmailutils/binflt.c
similarity index 100%
rename from mailbox/binflt.c
rename to libmailutils/binflt.c
diff --git a/mailbox/body.c b/libmailutils/body.c
similarity index 100%
rename from mailbox/body.c
rename to libmailutils/body.c
diff --git a/mailbox/cfg_driver.c b/libmailutils/cfg_driver.c
similarity index 100%
rename from mailbox/cfg_driver.c
rename to libmailutils/cfg_driver.c
diff --git a/mailbox/cfg_format.c b/libmailutils/cfg_format.c
similarity index 100%
rename from mailbox/cfg_format.c
rename to libmailutils/cfg_format.c
diff --git a/mailbox/cfg_lexer.l b/libmailutils/cfg_lexer.l
similarity index 100%
rename from mailbox/cfg_lexer.l
rename to libmailutils/cfg_lexer.l
diff --git a/mailbox/cfg_parser.y b/libmailutils/cfg_parser.y
similarity index 100%
rename from mailbox/cfg_parser.y
rename to libmailutils/cfg_parser.y
diff --git a/mailbox/crlfdot.c b/libmailutils/crlfdot.c
similarity index 100%
rename from mailbox/crlfdot.c
rename to libmailutils/crlfdot.c
diff --git a/mailbox/crlfflt.c b/libmailutils/crlfflt.c
similarity index 100%
rename from mailbox/crlfflt.c
rename to libmailutils/crlfflt.c
diff --git a/mailbox/cstrcasecmp.c b/libmailutils/cstrcasecmp.c
similarity index 100%
rename from mailbox/cstrcasecmp.c
rename to libmailutils/cstrcasecmp.c
diff --git a/mailbox/cstrlower.c b/libmailutils/cstrlower.c
similarity index 100%
rename from mailbox/cstrlower.c
rename to libmailutils/cstrlower.c
diff --git a/mailbox/cstrupper.c b/libmailutils/cstrupper.c
similarity index 100%
rename from mailbox/cstrupper.c
rename to libmailutils/cstrupper.c
diff --git a/mailbox/daemon.c b/libmailutils/daemon.c
similarity index 100%
rename from mailbox/daemon.c
rename to libmailutils/daemon.c
diff --git a/mailbox/date.c b/libmailutils/date.c
similarity index 100%
rename from mailbox/date.c
rename to libmailutils/date.c
diff --git a/mailbox/dbgstderr.c b/libmailutils/dbgstderr.c
similarity index 100%
rename from mailbox/dbgstderr.c
rename to libmailutils/dbgstderr.c
diff --git a/mailbox/dbgstream.c b/libmailutils/dbgstream.c
similarity index 100%
rename from mailbox/dbgstream.c
rename to libmailutils/dbgstream.c
diff --git a/mailbox/dbgsyslog.c b/libmailutils/dbgsyslog.c
similarity index 100%
rename from mailbox/dbgsyslog.c
rename to libmailutils/dbgsyslog.c
diff --git a/mailbox/debug.c b/libmailutils/debug.c
similarity index 100%
rename from mailbox/debug.c
rename to libmailutils/debug.c
diff --git a/mailbox/diag.c b/libmailutils/diag.c
similarity index 100%
rename from mailbox/diag.c
rename to libmailutils/diag.c
diff --git a/mailbox/dot.c b/libmailutils/dot.c
similarity index 100%
rename from mailbox/dot.c
rename to libmailutils/dot.c
diff --git a/mailbox/envelope.c b/libmailutils/envelope.c
similarity index 100%
rename from mailbox/envelope.c
rename to libmailutils/envelope.c
diff --git a/mailbox/errors b/libmailutils/errors
similarity index 100%
rename from mailbox/errors
rename to libmailutils/errors
diff --git a/mailbox/fgetpwent.c b/libmailutils/fgetpwent.c
similarity index 100%
rename from mailbox/fgetpwent.c
rename to libmailutils/fgetpwent.c
diff --git a/mailbox/file_stream.c b/libmailutils/file_stream.c
similarity index 100%
rename from mailbox/file_stream.c
rename to libmailutils/file_stream.c
diff --git a/mailbox/filter.c b/libmailutils/filter.c
similarity index 100%
rename from mailbox/filter.c
rename to libmailutils/filter.c
diff --git a/mailbox/filter_iconv.c b/libmailutils/filter_iconv.c
similarity index 100%
rename from mailbox/filter_iconv.c
rename to libmailutils/filter_iconv.c
diff --git a/mailbox/fltstream.c b/libmailutils/fltstream.c
similarity index 100%
rename from mailbox/fltstream.c
rename to libmailutils/fltstream.c
diff --git a/mailbox/folder.c b/libmailutils/folder.c
similarity index 100%
rename from mailbox/folder.c
rename to libmailutils/folder.c
diff --git a/mailbox/freeitem.c b/libmailutils/freeitem.c
similarity index 100%
rename from mailbox/freeitem.c
rename to libmailutils/freeitem.c
diff --git a/mailbox/gdebug.c b/libmailutils/gdebug.c
similarity index 100%
rename from mailbox/gdebug.c
rename to libmailutils/gdebug.c
diff --git a/mailbox/gocs.c b/libmailutils/gocs.c
similarity index 100%
rename from mailbox/gocs.c
rename to libmailutils/gocs.c
diff --git a/mailbox/hdritr.c b/libmailutils/hdritr.c
similarity index 100%
rename from mailbox/hdritr.c
rename to libmailutils/hdritr.c
diff --git a/mailbox/header.c b/libmailutils/header.c
similarity index 100%
rename from mailbox/header.c
rename to libmailutils/header.c
diff --git a/mailbox/iostream.c b/libmailutils/iostream.c
similarity index 100%
rename from mailbox/iostream.c
rename to libmailutils/iostream.c
diff --git a/mailbox/ipsrv.c b/libmailutils/ipsrv.c
similarity index 100%
rename from mailbox/ipsrv.c
rename to libmailutils/ipsrv.c
diff --git a/mailbox/iterator.c b/libmailutils/iterator.c
similarity index 100%
rename from mailbox/iterator.c
rename to libmailutils/iterator.c
diff --git a/mailbox/kwd.c b/libmailutils/kwd.c
similarity index 100%
rename from mailbox/kwd.c
rename to libmailutils/kwd.c
diff --git a/mailbox/linelenflt.c b/libmailutils/linelenflt.c
similarity index 100%
rename from mailbox/linelenflt.c
rename to libmailutils/linelenflt.c
diff --git a/mailbox/list.c b/libmailutils/list.c
similarity index 100%
rename from mailbox/list.c
rename to libmailutils/list.c
diff --git a/mailbox/listlist.c b/libmailutils/listlist.c
similarity index 100%
rename from mailbox/listlist.c
rename to libmailutils/listlist.c
diff --git a/mailbox/locale.c b/libmailutils/locale.c
similarity index 100%
rename from mailbox/locale.c
rename to libmailutils/locale.c
diff --git a/mailbox/locker.c b/libmailutils/locker.c
similarity index 100%
rename from mailbox/locker.c
rename to libmailutils/locker.c
diff --git a/mailbox/mailbox.c b/libmailutils/mailbox.c
similarity index 100%
rename from mailbox/mailbox.c
rename to libmailutils/mailbox.c
diff --git a/mailbox/mailcap.c b/libmailutils/mailcap.c
similarity index 100%
rename from mailbox/mailcap.c
rename to libmailutils/mailcap.c
diff --git a/mailbox/mailer.c b/libmailutils/mailer.c
similarity index 100%
rename from mailbox/mailer.c
rename to libmailutils/mailer.c
diff --git a/mailbox/mapfile_stream.c b/libmailutils/mapfile_stream.c
similarity index 100%
rename from mailbox/mapfile_stream.c
rename to libmailutils/mapfile_stream.c
diff --git a/mailbox/mbx_default.c b/libmailutils/mbx_default.c
similarity index 100%
rename from mailbox/mbx_default.c
rename to libmailutils/mbx_default.c
diff --git a/mailbox/mbxitr.c b/libmailutils/mbxitr.c
similarity index 100%
rename from mailbox/mbxitr.c
rename to libmailutils/mbxitr.c
diff --git a/mailbox/md5.c b/libmailutils/md5.c
similarity index 100%
rename from mailbox/md5.c
rename to libmailutils/md5.c
diff --git a/mailbox/memory_stream.c b/libmailutils/memory_stream.c
similarity index 100%
rename from mailbox/memory_stream.c
rename to libmailutils/memory_stream.c
diff --git a/mailbox/message.c b/libmailutils/message.c
similarity index 100%
rename from mailbox/message.c
rename to libmailutils/message.c
diff --git a/mailbox/message_stream.c b/libmailutils/message_stream.c
similarity index 100%
rename from mailbox/message_stream.c
rename to libmailutils/message_stream.c
diff --git a/mailbox/mime.c b/libmailutils/mime.c
similarity index 100%
rename from mailbox/mime.c
rename to libmailutils/mime.c
diff --git a/mailbox/mimehdr.c b/libmailutils/mimehdr.c
similarity index 100%
rename from mailbox/mimehdr.c
rename to libmailutils/mimehdr.c
diff --git a/mailbox/mkfilename.c b/libmailutils/mkfilename.c
similarity index 100%
rename from mailbox/mkfilename.c
rename to libmailutils/mkfilename.c
diff --git a/mailbox/monitor.c b/libmailutils/monitor.c
similarity index 100%
rename from mailbox/monitor.c
rename to libmailutils/monitor.c
diff --git a/mailbox/msgscan.c b/libmailutils/msgscan.c
similarity index 100%
rename from mailbox/msgscan.c
rename to libmailutils/msgscan.c
diff --git a/mailbox/msrv.c b/libmailutils/msrv.c
similarity index 100%
rename from mailbox/msrv.c
rename to libmailutils/msrv.c
diff --git a/mailbox/mu_auth.c b/libmailutils/mu_auth.c
similarity index 100%
rename from mailbox/mu_auth.c
rename to libmailutils/mu_auth.c
diff --git a/mailbox/muctype.c b/libmailutils/muctype.c
similarity index 100%
rename from mailbox/muctype.c
rename to libmailutils/muctype.c
diff --git a/mailbox/muerrno.cin b/libmailutils/muerrno.cin
similarity index 100%
rename from mailbox/muerrno.cin
rename to libmailutils/muerrno.cin
diff --git a/mailbox/muerror.c b/libmailutils/muerror.c
similarity index 100%
rename from mailbox/muerror.c
rename to libmailutils/muerror.c
diff --git a/mailbox/munre.c b/libmailutils/munre.c
similarity index 100%
rename from mailbox/munre.c
rename to libmailutils/munre.c
diff --git a/mailbox/mutil.c b/libmailutils/mutil.c
similarity index 100%
rename from mailbox/mutil.c
rename to libmailutils/mutil.c
diff --git a/mailbox/nls.c b/libmailutils/nls.c
similarity index 100%
rename from mailbox/nls.c
rename to libmailutils/nls.c
diff --git a/mailbox/nullrec.c b/libmailutils/nullrec.c
similarity index 100%
rename from mailbox/nullrec.c
rename to libmailutils/nullrec.c
diff --git a/mailbox/observer.c b/libmailutils/observer.c
similarity index 100%
rename from mailbox/observer.c
rename to libmailutils/observer.c
diff --git a/mailbox/opool.c b/libmailutils/opool.c
similarity index 100%
rename from mailbox/opool.c
rename to libmailutils/opool.c
diff --git a/mailbox/parse822.c b/libmailutils/parse822.c
similarity index 100%
rename from mailbox/parse822.c
rename to libmailutils/parse822.c
diff --git a/mailbox/parsedate.y b/libmailutils/parsedate.y
similarity index 100%
rename from mailbox/parsedate.y
rename to libmailutils/parsedate.y
diff --git a/mailbox/permstr.c b/libmailutils/permstr.c
similarity index 100%
rename from mailbox/permstr.c
rename to libmailutils/permstr.c
diff --git a/mailbox/prog_stream.c b/libmailutils/prog_stream.c
similarity index 100%
rename from mailbox/prog_stream.c
rename to libmailutils/prog_stream.c
diff --git a/mailbox/progmailer.c b/libmailutils/progmailer.c
similarity index 100%
rename from mailbox/progmailer.c
rename to libmailutils/progmailer.c
diff --git a/mailbox/property.c b/libmailutils/property.c
similarity index 100%
rename from mailbox/property.c
rename to libmailutils/property.c
diff --git a/mailbox/qpflt.c b/libmailutils/qpflt.c
similarity index 100%
rename from mailbox/qpflt.c
rename to libmailutils/qpflt.c
diff --git a/mailbox/rdcache_stream.c b/libmailutils/rdcache_stream.c
similarity index 100%
rename from mailbox/rdcache_stream.c
rename to libmailutils/rdcache_stream.c
diff --git a/mailbox/refcount.c b/libmailutils/refcount.c
similarity index 100%
rename from mailbox/refcount.c
rename to libmailutils/refcount.c
diff --git a/mailbox/registrar.c b/libmailutils/registrar.c
similarity index 100%
rename from mailbox/registrar.c
rename to libmailutils/registrar.c
diff --git a/mailbox/rfc2047.c b/libmailutils/rfc2047.c
similarity index 100%
rename from mailbox/rfc2047.c
rename to libmailutils/rfc2047.c
diff --git a/mailbox/secret.c b/libmailutils/secret.c
similarity index 100%
rename from mailbox/secret.c
rename to libmailutils/secret.c
diff --git a/mailbox/server.c b/libmailutils/server.c
similarity index 100%
rename from mailbox/server.c
rename to libmailutils/server.c
diff --git a/mailbox/sha1.c b/libmailutils/sha1.c
similarity index 100%
rename from mailbox/sha1.c
rename to libmailutils/sha1.c
diff --git a/mailbox/size_max.h b/libmailutils/size_max.h
similarity index 100%
rename from mailbox/size_max.h
rename to libmailutils/size_max.h
diff --git a/mailbox/socket_stream.c b/libmailutils/socket_stream.c
similarity index 100%
rename from mailbox/socket_stream.c
rename to libmailutils/socket_stream.c
diff --git a/mailbox/stdio_stream.c b/libmailutils/stdio_stream.c
similarity index 100%
rename from mailbox/stdio_stream.c
rename to libmailutils/stdio_stream.c
diff --git a/mailbox/stream.c b/libmailutils/stream.c
similarity index 100%
rename from mailbox/stream.c
rename to libmailutils/stream.c
diff --git a/mailbox/stream_printf.c b/libmailutils/stream_printf.c
similarity index 100%
rename from mailbox/stream_printf.c
rename to libmailutils/stream_printf.c
diff --git a/mailbox/stream_vprintf.c b/libmailutils/stream_vprintf.c
similarity index 100%
rename from mailbox/stream_vprintf.c
rename to libmailutils/stream_vprintf.c
diff --git a/mailbox/streamcpy.c b/libmailutils/streamcpy.c
similarity index 100%
rename from mailbox/streamcpy.c
rename to libmailutils/streamcpy.c
diff --git a/mailbox/streamref.c b/libmailutils/streamref.c
similarity index 100%
rename from mailbox/streamref.c
rename to libmailutils/streamref.c
diff --git a/mailbox/stripws.c b/libmailutils/stripws.c
similarity index 100%
rename from mailbox/stripws.c
rename to libmailutils/stripws.c
diff --git a/mailbox/strltrim.c b/libmailutils/strltrim.c
similarity index 100%
rename from mailbox/strltrim.c
rename to libmailutils/strltrim.c
diff --git a/mailbox/strrtrim.c b/libmailutils/strrtrim.c
similarity index 100%
rename from mailbox/strrtrim.c
rename to libmailutils/strrtrim.c
diff --git a/mailbox/strskip.c b/libmailutils/strskip.c
similarity index 100%
rename from mailbox/strskip.c
rename to libmailutils/strskip.c
diff --git a/mailbox/syslog.c b/libmailutils/syslog.c
similarity index 100%
rename from mailbox/syslog.c
rename to libmailutils/syslog.c
diff --git a/mailbox/system.c b/libmailutils/system.c
similarity index 100%
rename from mailbox/system.c
rename to libmailutils/system.c
diff --git a/mailbox/tcp.c b/libmailutils/tcp.c
similarity index 100%
rename from mailbox/tcp.c
rename to libmailutils/tcp.c
diff --git a/mailbox/temp_file_stream.c b/libmailutils/temp_file_stream.c
similarity index 100%
rename from mailbox/temp_file_stream.c
rename to libmailutils/temp_file_stream.c
diff --git a/mailbox/testsuite/Decode b/libmailutils/tests/Decode
similarity index 100%
rename from mailbox/testsuite/Decode
rename to libmailutils/tests/Decode
diff --git a/readmsg/tests/Makefile.am b/libmailutils/tests/Makefile.am
similarity index 78%
copy from readmsg/tests/Makefile.am
copy to libmailutils/tests/Makefile.am
index 69c08a9..4cee19c 100644
--- a/readmsg/tests/Makefile.am
+++ b/libmailutils/tests/Makefile.am
@@ -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],      address@hidden@])'; \
          echo 'm4_define([AT_PACKAGE_TARNAME],   address@hidden@])'; \
@@ -34,13 +34,47 @@ $(srcdir)/package.m4: $(top_srcdir)/configure.ac
 
 #
 
+## -------------------------- ##
+## 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}\
+ @address@hidden
+ ${MU_LIB_MAILUTILS}
+
+EXTRA_DIST += Encode Decode
+
 ## ------------ ##
 ## Test suite.  ##
 ## ------------ ##
 
 TESTSUITE_AT = \
- all.at\
- 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
diff --git a/libmailutils/tests/addr.c b/libmailutils/tests/addr.c
new file mode 100644
index 0000000..7e91f99
--- /dev/null
+++ b/libmailutils/tests/addr.c
@@ -0,0 +1,103 @@
+/* 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;
+}
diff --git a/libmailutils/tests/address.at b/libmailutils/tests/address.at
new file mode 100644
index 0000000..9ce9fa3
--- /dev/null
+++ b/libmailutils/tests/address.at
@@ -0,0 +1,1080 @@
+# 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]]:address@hidden>],[],
+[1],
+[],
+[MU_ERR_BAD_822_FORMAT
+])
+
+TESTADDR(address@hidden,address@hidden,[],
+[0],
+[naddr: 2
+1. email <address@hidden>:
+local-part <a> domain <b>
+2. email <address@hidden>:
+local-part <z> domain <y>
+])
+
+TESTADDR([,address@hidden,address@hidden,[],
+[0],
+[naddr: 2
+1. email <address@hidden>:
+local-part <a> domain <b>
+2. email <address@hidden>:
+local-part <z> domain <y>
+])
+
+TESTADDR(address@hidden,address@hidden,],[],
+[0],
+[naddr: 2
+1. email <address@hidden>:
+local-part <a> domain <b>
+2. email <address@hidden>:
+local-part <z> domain <y>
+])
+
+TESTADDR([,address@hidden,address@hidden,],[],
+[0],
+[naddr: 2
+1. email <address@hidden>:
+local-part <a> domain <b>
+2. email <address@hidden>:
+local-part <z> domain <y>
+])
+
+TESTADDR(address@hidden,,address@hidden,[],
+[0],
+[naddr: 2
+1. email <address@hidden>:
+local-part <a> domain <b>
+2. email <address@hidden>:
+local-part <z> domain <y>
+])
+
+TESTADDR(address@hidden,,,address@hidden,[],
+[0],
+[naddr: 2
+1. email <address@hidden>:
+local-part <a> domain <b>
+2. email <address@hidden>:
+local-part <z> domain <y>
+])
+
+TESTADDR([,,,address@hidden,,,],[],
+[0],
+[naddr: 1
+1. email <address@hidden>:
+local-part <a> domain <b>
+])
+
+TESTADDR([,address@hidden,[],
+[0],
+[naddr: 1
+1. email <address@hidden>:
+local-part <a> domain <b>
+])
+
+TESTADDR(address@hidden,],[],
+[0],
+[naddr: 1
+1. email <address@hidden>:
+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: address@hidden,address@hidden;],[group],
+[0],
+[naddr: 2
+1. email <address@hidden>:
+local-part <a> domain <b>
+2. email <address@hidden>:
+local-part <z> domain <y>
+])
+
+TESTADDR([a group: ,address@hidden,address@hidden;],[group],
+[0],
+[naddr: 2
+1. email <address@hidden>:
+local-part <a> domain <b>
+2. email <address@hidden>:
+local-part <z> domain <y>
+])
+
+TESTADDR([a group: address@hidden,address@hidden,;],[group],
+[0],
+[naddr: 2
+1. email <address@hidden>:
+local-part <a> domain <b>
+2. email <address@hidden>:
+local-part <z> domain <y>
+])
+
+TESTADDR([a group: ,address@hidden,address@hidden,;],[group],
+[0],
+[naddr: 2
+1. email <address@hidden>:
+local-part <a> domain <b>
+2. email <address@hidden>:
+local-part <z> domain <y>
+])
+
+TESTADDR([a group: address@hidden,,address@hidden;],[group],
+[0],
+[naddr: 2
+1. email <address@hidden>:
+local-part <a> domain <b>
+2. email <address@hidden>:
+local-part <z> domain <y>
+])
+
+TESTADDR([a group: address@hidden,,,address@hidden;],[group],
+[0],
+[naddr: 2
+1. email <address@hidden>:
+local-part <a> domain <b>
+2. email <address@hidden>:
+local-part <z> domain <y>
+])
+
+TESTADDR([a group: ,,,address@hidden,,, ;],[group],
+[0],
+[naddr: 1
+1. email <address@hidden>:
+local-part <a> domain <b>
+])
+
+TESTADDR([a group: ,address@hidden ;],[group],
+[0],
+[naddr: 1
+1. email <address@hidden>:
+local-part <a> domain <b>
+])
+
+TESTADDR([a group: address@hidden, ;],[group],
+[0],
+[naddr: 1
+1. email <address@hidden>:
+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]]:address@hidden> ;],[],
+[1],
+[],
+[MU_ERR_BAD_822_FORMAT
+])
+
+TESTADDR([Aliens: Sam <@[matrix (smtp)]: address@hidden>, address@hidden;],[],
+[0],
+[[naddr: 2
+1. email <address@hidden>:
+personal <Sam>
+local-part <sam> domain <sam>
+route <@[matrix (smtp)]>
+2. email <address@hidden>:
+local-part <sroberts> domain <[10].[1]>
+]])
+
+TESTADDR(address@hidden, Aliens: Sam <@[matrix (smtp)]: address@hidden>, 
address@hidden;],
+[],
+[0],
+[[naddr: 3
+1. email <address@hidden>:
+local-part <lo> domain <hi>
+2. email <address@hidden>:
+personal <Sam>
+local-part <sam> domain <sam>
+route <@[matrix (smtp)]>
+3. email <address@hidden>:
+local-part <sroberts> domain <[10].[1]>
+]])
+
+TESTADDR([Aliens: Sam <@[matrix (smtp)]: address@hidden>, address@hidden;, 
address@hidden,
+[],
+[0],
+[[naddr: 3
+1. email <address@hidden>:
+personal <Sam>
+local-part <sam> domain <sam>
+route <@[matrix (smtp)]>
+2. email <address@hidden>:
+local-part <sroberts> domain <[10].[1]>
+3. email <address@hidden>:
+local-part <hi> domain <lo>
+]])
+
+TESTADDR(address@hidden, Aliens: Sam <@[matrix (smtp)]: address@hidden>, 
address@hidden;, address@hidden,
+[],
+[0],
+[[naddr: 4
+1. email <address@hidden>:
+local-part <lo> domain <hi>
+2. email <address@hidden>:
+personal <Sam>
+local-part <sam> domain <sam>
+route <@[matrix (smtp)]>
+3. email <address@hidden>:
+local-part <sroberts> domain <[10].[1]>
+4. email <address@hidden>:
+local-part <hi> domain <lo>
+]])
+
+TESTADDR([Sam <@mail2.uniserve.com:address@hidden>],[],
+[0],
+[naddr: 1
+1. email <address@hidden>:
+personal <Sam>
+local-part <sroberts> domain <uniserve.com>
+route <@mail2.uniserve.com>
+])
+
+TESTADDR([< (hey) @ (hey, )smtp1.sympatico.ca, mail2.uniserve.com 
(hoo!):address@hidden>],[],
+[1],
+[],
+[MU_ERR_BAD_822_FORMAT
+])
+
+TESTADDR(address@hidden (Hardware Support Account)],[],
+[0],
+[naddr: 1
+1. email <address@hidden>:
+personal <Hardware Support Account>
+local-part <hw> domain <570.com>
+])
+
+TESTADDR(address@hidden (=?ISO-8859-1?Q?Claus_F=E4rber?=)],[],
+[0],
+[naddr: 1
+1. email <address@hidden>:
+personal <=?ISO-8859-1?Q?Claus_F=E4rber?=>
+local-part <list-ietf-wg-apps-drums> domain <faerber.muc.de>
+])
+
+TESTADDR([<address@hidden>(mutt #369), address@hidden (#369)],[],
+[0],
+[naddr: 2
+1. email <address@hidden>:
+local-part <mutt-dev> domain <mutt.org>
+2. email <address@hidden>:
+personal <#369>
+local-part <guug-bugs-closed> domain <guug.de>
+])
+
+dnl --------------------------------------------------------------------------
+dnl FIXME:
+m4_if([TESTADDR(["'Aernoudt Bottemanne'"        <address@hidden>],[],
+[0],
+[naddr: 1
+1. email <address@hidden>:
+personal <'Aernoudt Bottemanne'>
+local-part <Aernoudt.Bottemanne> domain <Informix.com>
+])
+
+TESTADDR(["'Haag, Ullrich - MBDC'" <address@hidden>,],[],
+[0],
+[naddr: 1
+1. email <address@hidden>:
+personal <'Haag, Ullrich - MBDC'>
+local-part <Ullrich.Haag> domain <MBDC.com>
+])
+
+TESTADDR(["'Michael C. Ibarra'" <address@hidden>, address@hidden, Al 
<address@hidden>],
+[],
+[0],
+[naddr: 3
+1. email <address@hidden>:
+personal <'Michael C. Ibarra'>
+local-part <ibarra> domain <hawk.com>
+2. email <address@hidden>:
+local-part <arl> domain <q7.net>
+3. email <address@hidden>:
+personal <Al>
+local-part <arl> domain <q7.net>
+])
+
+TESTADDR(["'Sam Roberts'" <address@hidden>],[],
+[0],
+[naddr: 1
+1. email <address@hidden>:
+personal <'Sam Roberts'>
+local-part <sam> domain <cogent.ca>
+])
+
+TESTADDR(["'address@hidden'" <address@hidden>,],[],
+[0],
+[naddr: 1
+1. email <address@hidden>:
+personal <'address@hidden'>
+local-part <paul> domain <pitbull-productions.com>
+])
+
+TESTADDR(["'address@hidden'" <address@hidden>, "'address@hidden'"],[],
+[1],
+[],
+[MU_ERR_BAD_822_FORMAT
+])
+
+TESTADDR(["'address@hidden'" <address@hidden>],[]
+[0],
+[naddr: 1
+1. email <address@hidden>:
+personal <'address@hidden'>
+local-part <sroberts> domain <certicom.ca>
+])
+
+])
+dnl --------------------------------------------------------------------------
+
+TESTADDR(["=?iso-8859-1?Q?Juan_Carlos_Marcos_Rodr=EDguez?=" 
<address@hidden>],[],
+[0],
+[naddr: 1
+1. email <address@hidden>:
+personal <=?iso-8859-1?Q?Juan_Carlos_Marcos_Rodr=EDguez?=>
+local-part <jcmarcos> domain <datavoice.es>
+])
+
+TESTADDR(["Christian Edward Gruber" <address@hidden>,],[],
+[0],
+[naddr: 1
+1. email <address@hidden>:
+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" <address@hidden>, address@hidden,[],
+[0],
+[naddr: 2
+1. email <address@hidden>:
+personal <D. J. Bernstein>
+local-part <djb> domain <cr.yp.to>
+2. email <address@hidden>:
+local-part <drums> domain <cs.utk.edu>
+])
+
+TESTADDR(["Dave Sill <de5-drums" <address@hidden>],[],
+[0],
+[naddr: 1
+1. email <address@hidden>:
+personal <Dave Sill <de5-drums>
+local-part <de5-drums> domain <sws5.ctd.ornl.gov>
+])
+
+TESTADDR(["Dave \(work\) Baerg \(E-mail\)" <address@hidden>],[],
+[0],
+[naddr: 1
+1. email <address@hidden>:
+personal <Dave (work) Baerg (E-mail)>
+local-part <Dave.Baerg> domain <SUMMedia.com>
+])
+
+TESTADDR(["Demian" <address@hidden>],[],
+[0],
+[naddr: 1
+1. email <address@hidden>:
+personal <Demian>
+local-part <damient> domain <wave.home.com>
+])
+
+TESTADDR(["Detailed Revision/Update of Message Standards" <address@hidden>],[],
+[0],
+[naddr: 1
+1. email <address@hidden>:
+personal <Detailed Revision/Update of Message Standards>
+local-part <drums> domain <cs.utk.edu>
+])
+
+TESTADDR(["Fred" <address@hidden>],[],
+[0],
+[naddr: 1
+1. email <address@hidden>:
+personal <Fred>
+local-part <fprog> domain <__nowhere__.users.sourceforge.net>
+])
+
+TESTADDR(["Haag, Ullrich - MBDC" <address@hidden>],[],
+[0],
+[naddr: 1
+1. email <address@hidden>:
+personal <Haag, Ullrich - MBDC>
+local-part <Ullrich.Haag> domain <MBDC.com>
+])
+
+TESTADDR(["Jacob Palme" <address@hidden>, <address@hidden>],[],
+[0],
+[naddr: 2
+1. email <address@hidden>:
+personal <Jacob Palme>
+local-part <jpalme> domain <dsv.su.se>
+2. email <address@hidden>:
+local-part <drums> domain <cs.utk.edu>
+])
+
+dnl FIXME
+m4_if([
+TESTADDR(["Jakob 'sparky' Kaivo" <address@hidden>],[],
+[0],
+[naddr: 1
+1. email <address@hidden>:
+personal <Jakob 'sparky' Kaivo>
+local-part <jkaivo> domain <elijah.nodomainname.net>
+])
+])
+
+TESTADDR(["Lee R. Copp" <address@hidden>],[],
+[0],
+[naddr: 1
+1. email <address@hidden>:
+personal <Lee R. Copp>
+local-part <Lee.R.Copp> domain <MichiganScientific.com>
+])
+
+TESTADDR(["Lionel Johnson" <address@hidden>],[],
+[0],
+[naddr: 1
+1. email <address@hidden>:
+personal <Lionel Johnson>
+local-part <ljohnson**nospam**> domain <sterling1.com>
+])
+
+TESTADDR(["Martin [Keso] Keseg" <address@hidden>],[],
+[0],
+[[naddr: 1
+1. email <address@hidden>:
+personal <Martin [Keso] Keseg>
+local-part <Martin.Keseg> domain <slovakia.sun.com>
+]])
+
+TESTADDR(["}{ristoph" <address@hidden>],[],
+[0],
+[naddr: 1
+1. email <address@hidden>:
+personal <}{ristoph>
+local-part <news2> domain <kristoph.net>
+])
+
+TESTADDR(["fmartens-2000" <address@hidden>],[],
+[0],
+[naddr: 1
+1. email <address@hidden>:
+personal <fmartens-2000>
+local-part <fmartens-2000> domain <planet.nl>
+])
+
+dnl FIXME
+m4_if([
+TESTADDR(["g'o'tz ohnesorge" <address@hidden>],[],
+[0],
+[naddr: 1
+1. email <address@hidden>:
+personal <g'o'tz ohnesorge>
+local-part <gohnesorge> domain <lh-computertechnik.de>
+])
+
+])
+
+TESTADDR(["gao jie" <address@hidden>],[],
+[0],
+[naddr: 1
+1. email <address@hidden>:
+personal <gao jie>
+local-part <jiegi> domain <public.wh.hb.cn>
+])
+
+TESTADDR(["address@hidden" <address@hidden>],
+[],
+[0],
+[naddr: 1
+1. email <address@hidden>:
+personal <address@hidden>
+local-part <gnupg-devel%gnupg.org> domain <f48.n48.z2.fidonet.org>
+])
+
+TESTADDR(["gpg-devel" <address@hidden>],[],
+[0],
+[naddr: 1
+1. email <address@hidden>:
+personal <gpg-devel>
+local-part <gnupg-devel> domain <gnupg.org>
+])
+
+TESTADDR(["jigang" <address@hidden>],[],
+[0],
+[naddr: 1
+1. email <address@hidden>:
+personal <jigang>
+local-part <jigang> domain <jinglun.com.cn>
+])
+
+TESTADDR(["address@hidden" <address@hidden>],[],
+[0],
+[naddr: 1
+1. email <address@hidden>:
+personal <address@hidden>
+local-part <misc> domain <openbsd.org>
+])
+
+TESTADDR(["address@hidden" <address@hidden>, address@hidden,[],
+[0],
+[naddr: 2
+1. email <address@hidden>:
+personal <address@hidden>
+local-part <misc> domain <openbsd.org>
+2. email <address@hidden>:
+local-part <brian> domain <Awfulhak.org>
+])
+
+TESTADDR(["mutt-dev @ mutt . orgThomas Roessler" <address@hidden>],[],
+[0],
+[naddr: 1
+1. email <address@hidden>:
+personal <mutt-dev @ mutt . orgThomas Roessler>
+local-part <roessler> domain <does-not-exist.org>
+])
+
+TESTADDR(["address@hidden" <address@hidden>],[],
+[0],
+[naddr: 1
+1. email <address@hidden>:
+personal <address@hidden>
+local-part <zwk%f36.n480.z2.fidonet.org> domain <f36.n480.z2.fidonet.org>
+])
+
+dnl FIXME
+m4_if([
+TESTADDR(['Dan Dall'Acqua' <address@hidden>, 'Dave Shyong'],[],
+[1],
+[],
+[MU_ERR_BAD_822_FORMAT
+])
+
+])
+
+TESTADDR(address@hidden,[],
+[0],
+[naddr: 1
+1. email <address@hidden>:
+local-part <0xdeadbeef-request> domain <petting-zoo.net>
+])
+
+TESTADDR(address@hidden,[],
+[0],
+[naddr: 1
+1. email <address@hidden>:
+local-part <102023-00406421> domain <cnxt19932218.conexant.com>
+])
+
+TESTADDR(address@hidden,[],
+[0],
+[naddr: 1
+1. email <address@hidden>:
+local-part <218164.24.43> domain <jobcontrolcenter.com>
+])
+
+TESTADDR([<address@hidden>],[],
+[0],
+[naddr: 1
+1. email <address@hidden>:
+local-part <0xdeadbeef-request> domain <petting-zoo.net>
+])
+
+TESTADDR([<>],[],
+[0],
+[naddr: 1
+1. email <>:
+])
+
+TESTADDR([<address@hidden>],[],
+[0],
+[naddr: 1
+1. email <address@hidden>:
+local-part <Christia.Roberts> domain <nrc.ca>
+])
+
+TESTADDR([<address@hidden>],[],
+[0],
+[naddr: 1
+1. email <address@hidden>:
+local-part <Nick_Shelness> domain <motorcity2.lotus.com>
+])
+
+TESTADDR([<all: >],[],
+[1],
+[],
+[MU_ERR_BAD_822_FORMAT
+])
+
+TESTADDR([<address@hidden>],[],
+[0],
+[naddr: 1
+1. email <address@hidden>:
+local-part <fyi-admin> domain <emyr.net>
+])
+
+TESTADDR([<address@hidden>, <address@hidden>,],[],
+[0],
+[naddr: 2
+1. email <address@hidden>:
+local-part <gary.stefanov> domain <medtronic.com>
+2. email <address@hidden>:
+local-part <HdeVisse> domain <husky.ca>
+])
+
+TESTADDR([<address@hidden>],[],
+[0],
+[naddr: 1
+1. email <address@hidden>:
+local-part <gnu-pop-list> domain <nodomainname.net>
+])
+
+TESTADDR([<address@hidden>],[],
+[0],
+[naddr: 1
+1. email <address@hidden>:
+local-part <mutt-dev-owner-sroberts=uniserve.com> domain <ns.gbnet.net>
+])
+
+TESTADDR([=?ISO-8859-1?Q?Kolbj=F8rn_Barmen?= <address@hidden>],[],
+[0],
+[naddr: 1
+1. email <address@hidden>:
+personal <=?ISO-8859-1?Q?Kolbj=F8rn_Barmen?=>
+local-part <kolla> domain <nvg.ntnu.no>
+])
+
+TESTADDR([=?ISO-8859-1?Q?Patrik_F=E4ltstr=F6m?= <address@hidden>],[],
+[0],
+[naddr: 1
+1. email <address@hidden>:
+personal <=?ISO-8859-1?Q?Patrik_F=E4ltstr=F6m?=>
+local-part <paf> domain <cisco.com>
+])
+
+TESTADDR([=?ISO-8859-1?Q?Patrik_F=E4ltstr=F6m?= <address@hidden>,],[],
+[0],
+[naddr: 1
+1. email <address@hidden>:
+personal <=?ISO-8859-1?Q?Patrik_F=E4ltstr=F6m?=>
+local-part <paf> domain <cisco.com>
+])
+
+TESTADDR([=?US-ASCII?Q?gary=5Fc?= <address@hidden>],[],
+[0],
+[naddr: 1
+1. email <address@hidden>:
+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 
<address@hidden>],[],
+[0],
+[naddr: 1
+1. email <address@hidden>:
+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 
<address@hidden>,],[],
+[0],
+[naddr: 1
+1. email <address@hidden>:
+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?= 
<address@hidden>],[],
+[0],
+[naddr: 1
+1. email <address@hidden>:
+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?= <address@hidden>],[],
+[0],
+[naddr: 1
+1. email <address@hidden>:
+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?= <address@hidden>],[],
+[0],
+[naddr: 1
+1. email <address@hidden>:
+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?= <address@hidden>],[],
+[0],
+[naddr: 1
+1. email <address@hidden>:
+personal <=?iso-8859-1?Q?Mikko_H=E4nninen?=>
+local-part <Mikko.Hanninen> domain <dna.fi>
+])
+
+TESTADDR([=?iso-8859-1?Q?Mikko_H=E4nninen?= <address@hidden>],[],
+[0],
+[naddr: 1
+1. email <address@hidden>:
+personal <=?iso-8859-1?Q?Mikko_H=E4nninen?=>
+local-part <Mikko.Hanninen> domain <iki.fi>
+])
+
+TESTADDR([=?iso-8859-1?Q?R=E9mi_Guyomarch?= <address@hidden>],[],
+[0],
+[naddr: 1
+1. email <address@hidden>:
+personal <=?iso-8859-1?Q?R=E9mi_Guyomarch?=>
+local-part <rguyom> domain <321.net>
+])
+
+TESTADDR([=?iso-8859-1?Q?Ulf_M=F6ller?= <address@hidden>],[],
+[0],
+[naddr: 1
+1. email <address@hidden>:
+personal <=?iso-8859-1?Q?Ulf_M=F6ller?=>
+local-part <ulf> domain <fitug.de>
+])
+
+TESTADDR([ANDREW MARTIN <address@hidden>],[],
+[0],
+[naddr: 1
+1. email <address@hidden>:
+personal <ANDREW MARTIN>
+local-part <amartin> domain <ee.ryerson.ca>
+])
+
+TESTADDR([Abhay Ghaisas <address@hidden>, address@hidden,[],
+[0],
+[naddr: 2
+1. email <address@hidden>:
+personal <Abhay Ghaisas>
+local-part <abhay> domain <sobolev.does-not-exist.org>
+2. email <address@hidden>:
+local-part <mutt-dev> domain <mutt.org>
+])
+
+TESTADDR([Brian Salter-Duke <address@hidden>],[],
+[0],
+[naddr: 1
+1. email <address@hidden>:
+personal <Brian Salter-Duke>
+local-part <b_duke> domain <lacebark.ntu.edu.au>
+])
+
+TESTADDR([Catharine Shyong <address@hidden>],[],
+[0],
+[naddr: 1
+1. email <address@hidden>:
+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 <address@hidden>],[],
+[0],
+[naddr: 1
+1. email <address@hidden>:
+personal <Detailed Revision/Update of Message Standards>
+local-part <drums> domain <cs.utk.edu>
+])
+
+TESTADDR([Eric Allman <address@hidden>],[],
+[0],
+[naddr: 1
+1. email <address@hidden>:
+personal <Eric Allman>
+local-part <eric+ietf> domain <Sendmail.ORG>
+])
+
+TESTADDR([Gary <address@hidden>],[],
+[0],
+[naddr: 1
+1. email <address@hidden>:
+personal <Gary>
+local-part <Gary> domain <e-c-s-uk.com>
+])
+
+TESTADDR([IETF working group on revision of mail standards 
<address@hidden>],[],
+[0],
+[naddr: 1
+1. email <address@hidden>:
+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:;, address@hidden,[],
+[0],
+[naddr: 1
+1. email <address@hidden>:
+local-part <drums> domain <cs.utk.edu>
+])
+
+TESTADDR([Jean-Baptiste Marchand <address@hidden>],[],
+[0],
+[naddr: 1
+1. email <address@hidden>:
+personal <Jean-Baptiste Marchand>
+local-part <Jean-Baptiste.Marchand> domain <epita.fr>
+])
+
+TESTADDR([Jonathan Rozes <address@hidden>],[],
+[0],
+[naddr: 1
+1. email <address@hidden>:
+personal <Jonathan Rozes>
+local-part <jrozes+969649116.89117462> domain <vinton.com>
+])
+
+TESTADDR([Jose "C." Garcia Sogo<address@hidden>],[],
+[0],
+[naddr: 1
+1. email <address@hidden>:
+personal <Jose C. Garcia Sogo>
+local-part <jose> domain <jaimedelamo.eu.org>
+])
+
+dnl FIXME
+m4_if([
+TESTADDR([Marco d'Itri <address@hidden>,[],
+[0],
+1. email <address@hidden>:
+personal <Marco d'Itri>
+local-part <md> domain <Linux.IT>
+])
+])
+
+TESTADDR(address@hidden,[],
+[0],
+[naddr: 1
+1. email <address@hidden>:
+local-part <No_Reply-To> domain <mapquest.com>
+])
+
+TESTADDR(address@hidden, address@hidden, boot],[],
+[0],
+[naddr: 3
+1. email <address@hidden>:
+local-part <OSULLIE> domain <rte.ie>
+2. email <address@hidden>:
+local-part <skidswam> domain <hotmail.com>
+3. email <address@hidden>:
+local-part <boot> domain <localhost>
+])
+
+TESTADDR([Paul Hoffman / IMC <address@hidden>],[],
+[0],
+[naddr: 1
+1. email <address@hidden>:
+personal <Paul Hoffman / IMC>
+local-part <phoffman> domain <imc.org>
+])
+
+TESTADDR([Sam],[],
+[0],
+[naddr: 1
+1. email <address@hidden>:
+local-part <Sam> domain <localhost>
+])
+
+TESTADDR([Sam Roberts <address@hidden>],[],
+[0],
+[naddr: 1
+1. email <address@hidden>:
+personal <Sam Roberts>
+local-part <sam> domain <cogent.ca>
+])
+
+TESTADDR([Sam_Roberts/address@hidden,[],
+[0],
+[naddr: 1
+1. email <Sam_Roberts/address@hidden>:
+local-part <Sam_Roberts/Certicom%Certicom> domain <certicom.com>
+])
+
+TESTADDR([Thomas Roessler <address@hidden>, address@hidden,[],
+[0],
+[naddr: 2
+1. email <address@hidden>:
+personal <Thomas Roessler>
+local-part <roessler> domain <does-not-exist.org>
+2. email <address@hidden>:
+local-part <490> domain <bugs.guug.de>
+])
+
+TESTADDR([Thomas Roessler <address@hidden>, address@hidden,[],
+[0],
+[naddr: 2
+1. email <address@hidden>:
+personal <Thomas Roessler>
+local-part <roessler> domain <does-not-exist.org>
+2. email <address@hidden>:
+local-part <g10> domain <gnupg.org>
+])
+
+TESTADDR(address@hidden,[],
+[0],
+[naddr: 1
+1. email <address@hidden>:
+local-part <ddickey> domain <ip-12-22-50-150.hqglobal.net>
+])
+
+TESTADDR([ktb <address@hidden>],[],
+[0],
+[naddr: 1
+1. email <address@hidden>:
+personal <ktb>
+local-part <x.y.f> domain <home.com>
+])
+
+dnl FIXME
+m4_if([
+TESTADDR(address@hidden, address@hidden, Kieran.O'address@hidden,[],
+[0],
+[naddr: 3
+1. email <address@hidden>:
+local-part <mcaustin> domain <eudoramail.com>
+2. email <address@hidden>:
+local-part <aposner> domain <usaid.gov>
+3. email <Kieran.O'address@hidden>:
+local-part <Kieran.O'Leary> domain <anpost.ie>
+])
+])
+
+TESTADDR(address@hidden@dikke.penguin.nl],[],
+[1],
+[],
+[MU_ERR_BAD_822_FORMAT
+])
+
+TESTADDR([root],[],
+[0],
+[naddr: 1
+1. email <address@hidden>:
+local-part <root> domain <localhost>
+])
+
+dnl FIXME srr <address@hidden>=> 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: address@hidden, address@hidden;],[],
+[0],
+[naddr: 2
+1. email <address@hidden>:
+local-part <mutt-dev> domain <mutt.org>
+2. email <address@hidden>:
+local-part <mutt-users> domain <mutt.org>
+])
+
+TESTADDR([Sergey V. Poznyakoff <address@hidden>],[],
+[0],
+[naddr: 1
+1. email <address@hidden>:
+personal <Sergey V. Poznyakoff>
+local-part <gray> domain <gnu.org>
+])
+
+TESTADDR([P. D. Q. Bach <address@hidden>],[],
+[0],
+[naddr: 1
+1. email <address@hidden>:
+personal <P. D. Q. Bach>
+local-part <bach> domain <somewhere.org>
+])
+
+TESTADDR(["A bad quote\" <address@hidden>],[],
+[1],
+[],
+[MU_ERR_BAD_822_FORMAT
+])
+
+
+
+
+
+
diff --git a/libmailutils/tests/argcv.at b/libmailutils/tests/argcv.at
new file mode 100644
index 0000000..5e40527
--- /dev/null
+++ b/libmailutils/tests/argcv.at
@@ -0,0 +1,91 @@
+# 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: "\""
+])
+
+
+
+
+
+
diff --git a/examples/argcv.c b/libmailutils/tests/argcv.c
similarity index 100%
rename from examples/argcv.c
rename to libmailutils/tests/argcv.c
diff --git a/readmsg/tests/atlocal.in b/libmailutils/tests/atlocal.in
similarity index 77%
copy from readmsg/tests/atlocal.in
copy to libmailutils/tests/atlocal.in
index aa0ba44..7e81e43 100644
--- a/readmsg/tests/atlocal.in
+++ b/libmailutils/tests/atlocal.in
@@ -2,6 +2,8 @@
 # Configurable variable values for Mailutils test suite.
 # Copyright (C) 2004, 2010 Free Software Foundation, Inc.
 
address@hidden@:@abs_top_builddir@/readmsg:$top_srcdir:$srcdir:$PATH
address@hidden@:@abs_top_builddir@/frm:$top_srcdir:$srcdir:$PATH
 address@hidden@
 address@hidden@
+
+  
\ No newline at end of file
diff --git a/sieve/tests/ext.at b/libmailutils/tests/base64d.at
similarity index 64%
copy from sieve/tests/ext.at
copy to libmailutils/tests/base64d.at
index 9e16f9d..7483dd6 100644
--- a/sieve/tests/ext.at
+++ b/libmailutils/tests/base64d.at
@@ -15,30 +15,25 @@
 # along with GNU Mailutils.  If not, see <http://www.gnu.org/licenses/>.
 # This file is part of Mailfromd testsuite. 
 
-AT_SETUP([loadable extensions: numaddr])
-AT_KEYWORDS([ext])
+AT_SETUP([base64 decoding (read)])
+AT_KEYWORDS([base64 base64d base64dr decode])
 
 AT_CHECK([
-MUT_PREREQ_CAPA([HAVE_LIBLTDL])
-
-AT_DATA([prog],[
-require "test-numaddr";
+cp $top_srcdir/libmailutils/tests/Encode expout
+fltst base64 decode read linelen=0 < $top_srcdir/libmailutils/tests/Decode],
+[0],
+[expout])
 
-if numaddr [[ "to", "cc" ]] :over 5
-  {
-    discard;
-  }
-])
+AT_CLEANUP
 
-cp $top_srcdir/testsuite/spool/bigto.mbox .
+
+AT_SETUP([base64 decoding (write)])
+AT_KEYWORDS([base64 base64d base64dw decode])
 
-sieve MUT_SIEVE_CMDLINE dnl
- --clearpath -L "${top_builddir}/examples" -f ./bigto.mbox prog
-],
+AT_CHECK([
+cp $top_srcdir/libmailutils/tests/Encode expout
+fltst base64 decode write linelen=0 < $top_srcdir/libmailutils/tests/Decode],
 [0],
-[],
-[DISCARD on msg uid 1: marking as deleted
-])
+[expout])
 
 AT_CLEANUP
-
diff --git a/sieve/tests/ext.at b/libmailutils/tests/base64e.at
similarity index 64%
copy from sieve/tests/ext.at
copy to libmailutils/tests/base64e.at
index 9e16f9d..452ed8f 100644
--- a/sieve/tests/ext.at
+++ b/libmailutils/tests/base64e.at
@@ -15,30 +15,25 @@
 # along with GNU Mailutils.  If not, see <http://www.gnu.org/licenses/>.
 # This file is part of Mailfromd testsuite. 
 
-AT_SETUP([loadable extensions: numaddr])
-AT_KEYWORDS([ext])
+AT_SETUP([base64 encoding (read)])
+AT_KEYWORDS([base64 base64e base64er encode])
 
 AT_CHECK([
-MUT_PREREQ_CAPA([HAVE_LIBLTDL])
-
-AT_DATA([prog],[
-require "test-numaddr";
+cp $top_srcdir/libmailutils/tests/Decode expout
+fltst base64 encode read nl < $top_srcdir/libmailutils/tests/Encode],
+[0],
+[expout])
 
-if numaddr [[ "to", "cc" ]] :over 5
-  {
-    discard;
-  }
-])
+AT_CLEANUP
 
-cp $top_srcdir/testsuite/spool/bigto.mbox .
+
+AT_SETUP([base64 encoding (write)])
+AT_KEYWORDS([base64 base64e base64ew encode])
 
-sieve MUT_SIEVE_CMDLINE dnl
- --clearpath -L "${top_builddir}/examples" -f ./bigto.mbox prog
-],
+AT_CHECK([
+cp $top_srcdir/libmailutils/tests/Decode expout
+fltst base64 encode write nl < $top_srcdir/libmailutils/tests/Encode],
 [0],
-[],
-[DISCARD on msg uid 1: marking as deleted
-])
-
-AT_CLEANUP
+[expout])
 
+AT_CLEANUP
\ No newline at end of file
diff --git a/libmailutils/tests/decode2047.at b/libmailutils/tests/decode2047.at
new file mode 100644
index 0000000..4f52d8d
--- /dev/null
+++ b/libmailutils/tests/decode2047.at
@@ -0,0 +1,60 @@
+# 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?= <address@hidden>],
+[Keith Moore <address@hidden>
+])
+
+TESTDEC2047([],[decode02],
+[=?ISO-8859-1?Q?Keld_J=F8rn_Simonsen?= <address@hidden>],
+[Keld J\370rn Simonsen <address@hidden>
+])
+
+TESTDEC2047([],[decode03],
+[=?ISO-8859-1?Q?Andr=E9?= Pirard <address@hidden>],
+[Andr\351 Pirard <address@hidden>
+])
+
+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
+])
+
+
+
diff --git a/examples/decode2047.c b/libmailutils/tests/decode2047.c
similarity index 96%
rename from examples/decode2047.c
rename to libmailutils/tests/decode2047.c
index bdb1ca2..f7c36a9 100644
--- a/examples/decode2047.c
+++ b/libmailutils/tests/decode2047.c
@@ -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);
diff --git a/sieve/tests/envelope.at b/libmailutils/tests/encode2047.at
similarity index 76%
copy from sieve/tests/envelope.at
copy to libmailutils/tests/encode2047.at
index a12f0ae..3b914e6 100644
--- a/sieve/tests/envelope.at
+++ b/libmailutils/tests/encode2047.at
@@ -15,15 +15,18 @@
 # along with GNU Mailutils.  If not, see <http://www.gnu.org/licenses/>.
 # This file is part of Mailfromd testsuite. 
 
-MUT_TESTCASE([envelope],[test envelope],
-[
-if envelope "from" "address@hidden" {
-      discard;
-}
-],[],[0],[],
-[DISCARD on msg uid 1: marking as deleted
-IMPLICIT KEEP on msg uid 2
-IMPLICIT KEEP on msg uid 3
+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
 
diff --git a/examples/encode2047.c b/libmailutils/tests/encode2047.c
similarity index 98%
rename from examples/encode2047.c
rename to libmailutils/tests/encode2047.c
index b5b0dde..dbf3620 100644
--- a/examples/encode2047.c
+++ b/libmailutils/tests/encode2047.c
@@ -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);
     }
diff --git a/examples/base64.c b/libmailutils/tests/fltst.c
similarity index 61%
copy from examples/base64.c
copy to libmailutils/tests/fltst.c
index aa6bdeb..6e36ede 100644
--- a/examples/base64.c
+++ b/libmailutils/tests/fltst.c
@@ -56,13 +56,12 @@ c_copy (mu_stream_t out, mu_stream_t in)
     }
   else
     MU_ASSERT (mu_stream_copy (out, in, 0, NULL));
-  mu_stream_write (out, "\n", 1, NULL);
-  mu_stream_close (out);
-  mu_stream_close (in);
+
   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.
@@ -82,90 +81,89 @@ reset_line_length (const char *name, size_t 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 c;
+  int i;
   int mode = MU_FILTER_ENCODE;
   int flags = MU_STREAM_READ;
-  char *input = NULL, *output = NULL;
-  char *encoding = "base64";
+  char *fltname;
   mu_off_t shift = 0;
   size_t line_length;
   int line_length_option = 0;
+  int newline_option = 0;
   
-  while ((c = getopt (argc, argv, "deE:hi:l:o:ps:vw")) != EOF)
-    switch (c)
-      {
-      case 'i':
-       input = optarg;
-       break;
-
-      case 'o':
-       output = optarg;
-       break;
-       
-      case 'd':
-       mode = MU_FILTER_DECODE;
-       break;
-
-      case 'E':
-       encoding = optarg;
-       break;
-       
-      case 'e':
-       mode = MU_FILTER_ENCODE;
-       break;
-
-      case 'l':
-       line_length = strtoul (optarg, NULL, 10);
-       line_length_option = 1;
-       break;
-       
-      case 'p':
-       printable = 1;
-       break;
-
-      case 's':
-       shift = strtoul (optarg, NULL, 0); 
-       break;
-       
-      case 'v':
-       verbose = 1;
-       break;
-
-      case 'h':
-       printf ("usage: base64 [-vpde][-E encoding][-i infile][-o outfile]\n");
-       exit (0);
-
-      case 'w':
-       flags = MU_STREAM_WRITE;
-       break;
-       
-      default:
-       exit (1);
-      }
-
-  if (input)
-    MU_ASSERT (mu_file_stream_create (&in, input, 
MU_STREAM_READ|MU_STREAM_SEEK));
+  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
-    MU_ASSERT (mu_stdio_stream_create (&in, MU_STDIN_FD, 0));
-  MU_ASSERT (mu_stream_open (in));
+    usage ("2nd arg is wrong");
 
-  if (output)
-    MU_ASSERT (mu_file_stream_create (&out, output, 
-                                      MU_STREAM_WRITE|MU_STREAM_CREAT));
+  if (strcmp (argv[3], "read") == 0)
+    flags = MU_STREAM_READ;
+  else if (strcmp (argv[3], "write") == 0)
+    flags = MU_STREAM_WRITE;
   else
-    MU_ASSERT (mu_stdio_stream_create (&out, MU_STDOUT_FD, 0));
+    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 (encoding, line_length);
+    reset_line_length (fltname, line_length);
   
   if (flags == MU_STREAM_READ)
     {
-      MU_ASSERT (mu_filter_create (&flt, in, encoding, mode,
+      MU_ASSERT (mu_filter_create (&flt, in, fltname, mode,
                                   MU_STREAM_READ|MU_STREAM_SEEK|
                                   MU_STREAM_AUTOCLOSE));
       if (shift)
@@ -174,12 +172,24 @@ main (int argc, char * argv [])
     }
   else
     {
-      MU_ASSERT (mu_filter_create (&flt, out, encoding, mode,
-                                  MU_STREAM_WRITE|MU_STREAM_AUTOCLOSE));
+      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;
 }
diff --git a/libmailutils/tests/mailcap.at b/libmailutils/tests/mailcap.at
new file mode 100644
index 0000000..fa9a767
--- /dev/null
+++ b/libmailutils/tests/mailcap.at
@@ -0,0 +1,279 @@
+# 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
+
+]])
diff --git a/examples/mailcap.c b/libmailutils/tests/mailcap.c
similarity index 100%
rename from examples/mailcap.c
rename to libmailutils/tests/mailcap.c
diff --git a/mailbox/testsuite/Mime b/libmailutils/tests/mime.at
similarity index 83%
rename from mailbox/testsuite/Mime
rename to libmailutils/tests/mime.at
index 147c16e..abed841 100644
--- a/mailbox/testsuite/Mime
+++ b/libmailutils/tests/mime.at
@@ -1,23 +1,28 @@
-# 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 <address@hidden>
 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
diff --git a/examples/mimetest.c b/libmailutils/tests/mimetest.c
similarity index 100%
rename from examples/mimetest.c
rename to libmailutils/tests/mimetest.c
diff --git a/sieve/tests/version.at b/libmailutils/tests/testsuite.at
similarity index 78%
copy from sieve/tests/version.at
copy to libmailutils/tests/testsuite.at
index 5b8fc36..9ac73d9 100644
--- a/sieve/tests/version.at
+++ b/libmailutils/tests/testsuite.at
@@ -17,4 +17,14 @@
 
 m4_include([testsuite.inc])
 
-MUT_VERSION(sieve)
+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])
diff --git a/examples/url-parse.c b/libmailutils/tests/url-parse.c
similarity index 89%
rename from examples/url-parse.c
rename to libmailutils/tests/url-parse.c
index 82541b5..3eb3d1c 100644
--- a/examples/url-parse.c
+++ b/libmailutils/tests/url-parse.c
@@ -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);
diff --git a/libmailutils/tests/url.at b/libmailutils/tests/url.at
new file mode 100644
index 0000000..63a3c1c
--- /dev/null
+++ b/libmailutils/tests/url.at
@@ -0,0 +1,776 @@
+# 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:address@hidden,
+[scheme <scheme>
+user <user>
+passwd <pass>
+auth <>
+host <host>
+port 0
+path <>
+])
+
+TESTURL([],[],
+[ftp://user:address@hidden//a/path],
+[scheme <ftp>
+user <user>
+passwd <pass>
+auth <>
+host <host>
+port 0
+path </a/path>
+])
+
+TESTURL([],[],
+[ftp://:address@hidden//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:address@hidden/a/path],
+[scheme <ftp>
+user <user>
+passwd <pass>
+auth <>
+host <host>
+port 0
+path <a/path>
+])
+
+
+TESTURL([],[],
+[ftp://:address@hidden/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://address@hidden,
+[scheme <pop>
+user <user>
+passwd <>
+auth <>
+host <pop.example.net>
+port 0
+path <>
+])
+
+TESTURL([],[],
+[pop://user:address@hidden,
+[scheme <pop>
+user <user>
+passwd <passwd>
+auth <>
+host <pop.example.net>
+port 0
+path <>
+])
+
+TESTURL([],[],
+[pop://user;address@hidden,
+[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://address@hidden:111],
+[scheme <pop>
+user <user>
+passwd <>
+auth <>
+host <pop.example.net>
+port 111
+path <>
+])
+
+TESTURL([],[],
+[pop://user:address@hidden:111],
+[scheme <pop>
+user <user>
+passwd <passwd>
+auth <>
+host <pop.example.net>
+port 111
+path <>
+])
+
+TESTURL([],[],
+[pop://user;address@hidden: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://address@hidden,
+[scheme <imap>
+user <user>
+passwd <>
+auth <>
+host <imap.example.net>
+port 0
+path <>
+])
+
+TESTURL([],[],
+[imap://user:address@hidden,
+[scheme <imap>
+user <user>
+passwd <passwd>
+auth <>
+host <imap.example.net>
+port 0
+path <>
+])
+
+TESTURL([],[],
+[imap://user;address@hidden,
+[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://address@hidden:111],
+[scheme <imap>
+user <user>
+passwd <>
+auth <>
+host <imap.example.net>
+port 111
+path <>
+])
+
+TESTURL([],[],
+[imap://user:address@hidden:111],
+[scheme <imap>
+user <user>
+passwd <passwd>
+auth <>
+host <imap.example.net>
+port 111
+path <>
+])
+
+TESTURL([],[],
+[imap://user;address@hidden: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://address@hidden/mbox],
+[scheme <imap>
+user <user>
+passwd <>
+auth <>
+host <imap.example.net>
+port 0
+path <mbox>
+])
+
+TESTURL([],[],
+[imap://user:address@hidden/mbox],
+[scheme <imap>
+user <user>
+passwd <passwd>
+auth <>
+host <imap.example.net>
+port 0
+path <mbox>
+])
+
+TESTURL([],[],
+[imap://user;address@hidden/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://address@hidden:111/mbox],
+[scheme <imap>
+user <user>
+passwd <>
+auth <>
+host <imap.example.net>
+port 111
+path <mbox>
+])
+
+TESTURL([],[],
+[imap://user:address@hidden:111/mbox],
+[scheme <imap>
+user <user>
+passwd <passwd>
+auth <>
+host <imap.example.net>
+port 111
+path <mbox>
+])
+
+TESTURL([],[],
+[imap://user;address@hidden:111/mbox],
+[scheme <imap>
+user <user>
+passwd <>
+auth <*>
+host <imap.example.net>
+port 111
+path <mbox>
+])
+
+TESTURL([],[],
+[imap://imap.example.net/mbox/address@hidden,
+[scheme <imap>
+user <imap.example.net/mbox/user>
+passwd <>
+auth <>
+host <host>
+port 0
+path <>
+])
+
+TESTURL([],[],
+[imap://address@hidden/mbox/address@hidden,
+[scheme <imap>
+user <user>
+passwd <>
+auth <>
+host <imap.example.net>
+port 0
+path <mbox/address@hidden>
+])
+
+TESTURL([],[],
+[imap://user:address@hidden/mbox/address@hidden,
+[scheme <imap>
+user <user>
+passwd <passwd>
+auth <>
+host <imap.example.net>
+port 0
+path <mbox/address@hidden>
+])
+
+TESTURL([],[],
+[imap://user;address@hidden/mbox/address@hidden,
+[scheme <imap>
+user <user>
+passwd <>
+auth <*>
+host <imap.example.net>
+port 0
+path <mbox/address@hidden>
+])
+
+TESTURL([],[],
+[imap://imap.example.net:111/mbox/address@hidden,
+[scheme <imap>
+user <imap.example.net>
+passwd <111/mbox/user>
+auth <>
+host <host>
+port 0
+path <>
+])
+
+TESTURL([],[],
+[imap://address@hidden:111/mbox/address@hidden,
+[scheme <imap>
+user <user>
+passwd <>
+auth <>
+host <imap.example.net>
+port 111
+path <mbox/address@hidden>
+])
+
+TESTURL([],[],
+[imap://user:address@hidden:111/mbox/address@hidden,
+[scheme <imap>
+user <user>
+passwd <passwd>
+auth <>
+host <imap.example.net>
+port 111
+path <mbox/address@hidden>
+])
+
+TESTURL([],[],
+[imap://user;address@hidden:111/mbox/address@hidden,
+[scheme <imap>
+user <user>
+passwd <>
+auth <*>
+host <imap.example.net>
+port 111
+path <mbox/address@hidden>
+])
+
+TESTURL([],[],
+[ftp://ftp.example.org/mbox/user%40host],
+[scheme <ftp>
+user <>
+passwd <>
+auth <>
+host <ftp.example.org>
+port 0
+path <mbox/address@hidden>
+])
+
+TESTURL([],[],
+[ftp://ftp.example.org:111/mbox/user%40host],
+[scheme <ftp>
+user <>
+passwd <>
+auth <>
+host <ftp.example.org>
+port 111
+path <mbox/address@hidden>
+])
+
+TESTURL([],[],
+[ftp://ftp.example.org:111/mbox/user%40host;type=pass],
+[[scheme <ftp>
+user <>
+passwd <>
+auth <>
+host <ftp.example.org>
+port 111
+path <mbox/address@hidden>
+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>
+]])
+
+
diff --git a/mailbox/ticket.c b/libmailutils/ticket.c
similarity index 100%
rename from mailbox/ticket.c
rename to libmailutils/ticket.c
diff --git a/mailbox/url.c b/libmailutils/url.c
similarity index 100%
rename from mailbox/url.c
rename to libmailutils/url.c
diff --git a/mailbox/vartab.c b/libmailutils/vartab.c
similarity index 100%
rename from mailbox/vartab.c
rename to libmailutils/vartab.c
diff --git a/mailbox/vasnprintf.c b/libmailutils/vasnprintf.c
similarity index 100%
rename from mailbox/vasnprintf.c
rename to libmailutils/vasnprintf.c
diff --git a/mailbox/version.c b/libmailutils/version.c
similarity index 100%
rename from mailbox/version.c
rename to libmailutils/version.c
diff --git a/mailbox/wicket.c b/libmailutils/wicket.c
similarity index 100%
rename from mailbox/wicket.c
rename to libmailutils/wicket.c
diff --git a/mailbox/xscript-stream.c b/libmailutils/xscript-stream.c
similarity index 100%
rename from mailbox/xscript-stream.c
rename to libmailutils/xscript-stream.c
diff --git a/mailbox/testsuite/.gitignore b/mailbox/testsuite/.gitignore
deleted file mode 100644
index 989f590..0000000
--- a/mailbox/testsuite/.gitignore
+++ /dev/null
@@ -1,7 +0,0 @@
-Makefile
-Makefile.in
-*.log
-*.sum
-site.exp
-remote.exp
-data
diff --git a/mailbox/testsuite/Addrs b/mailbox/testsuite/Addrs
deleted file mode 100644
index f301e65..0000000
--- a/mailbox/testsuite/Addrs
+++ /dev/null
@@ -1,644 +0,0 @@
-# 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 <address@hidden>=> error MU_ERR_BAD_822_FORMAT
-
-Sam <@[matrix (smtp)], @[nexus: \[node 12\]]:address@hidden> ;=> error 
MU_ERR_BAD_822_FORMAT
-
address@hidden,address@hidden> pcount 2
-1 email <address@hidden>
-   local-part <a> domain <b>
-2 email <address@hidden>
-   local-part <z> domain <y>
-
-,address@hidden,address@hidden> pcount 2
-1 email <address@hidden>
-   local-part <a> domain <b>
-2 email <address@hidden>
-   local-part <z> domain <y>
-
address@hidden,address@hidden,=> pcount 2
-1 email <address@hidden>
-   local-part <a> domain <b>
-2 email <address@hidden>
-   local-part <z> domain <y>
-
-,address@hidden,address@hidden,=> pcount 2
-1 email <address@hidden>
-   local-part <a> domain <b>
-2 email <address@hidden>
-   local-part <z> domain <y>
-
address@hidden,,address@hidden> pcount 2
-1 email <address@hidden>
-   local-part <a> domain <b>
-2 email <address@hidden>
-   local-part <z> domain <y>
-
address@hidden,,,address@hidden> pcount 2
-1 email <address@hidden>
-   local-part <a> domain <b>
-2 email <address@hidden>
-   local-part <z> domain <y>
-
-,,,address@hidden,,,=> pcount 1
-1 email <address@hidden>
-   local-part <a> domain <b>
-
-,address@hidden> pcount 1
-1 email <address@hidden>
-   local-part <a> domain <b>
-
address@hidden,=> pcount 1
-1 email <address@hidden>
-   local-part <a> domain <b>
-
-,=> error MU_ERR_EMPTY_ADDRESS
-
-,,=> error MU_ERR_EMPTY_ADDRESS
-
-,,,=> error MU_ERR_EMPTY_ADDRESS
-
-a group: address@hidden,address@hidden ;=> pcount 2
-1 email <address@hidden>
-   local-part <a> domain <b>
-2 email <address@hidden>
-   local-part <z> domain <y>
-
-a group: ,address@hidden,address@hidden ;=> pcount 2
-1 email <address@hidden>
-   local-part <a> domain <b>
-2 email <address@hidden>
-   local-part <z> domain <y>
-
-a group: address@hidden,address@hidden, ;=> pcount 2
-1 email <address@hidden>
-   local-part <a> domain <b>
-2 email <address@hidden>
-   local-part <z> domain <y>
-
-a group: ,address@hidden,address@hidden, ;=> pcount 2
-1 email <address@hidden>
-   local-part <a> domain <b>
-2 email <address@hidden>
-   local-part <z> domain <y>
-
-a group: address@hidden,,address@hidden ;=> pcount 2
-1 email <address@hidden>
-   local-part <a> domain <b>
-2 email <address@hidden>
-   local-part <z> domain <y>
-
-a group: address@hidden,,,address@hidden ;=> pcount 2
-1 email <address@hidden>
-   local-part <a> domain <b>
-2 email <address@hidden>
-   local-part <z> domain <y>
-
-a group: ,,,address@hidden,,, ;=> pcount 1
-1 email <address@hidden>
-   local-part <a> domain <b>
-
-a group: ,address@hidden ;=> pcount 1
-1 email <address@hidden>
-   local-part <a> domain <b>
-
-a group: address@hidden, ;=> pcount 1
-1 email <address@hidden>
-   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\]]:address@hidden> ;=> error 
MU_ERR_BAD_822_FORMAT
-
-Aliens: Sam <@[matrix (smtp)]: address@hidden>, address@hidden;=> pcount 2
-1 email <address@hidden>
-   personal <Sam>
-   local-part <sam> domain <sam>
-   route <@[matrix (smtp)]>
-2 email <address@hidden>
-   local-part <sroberts> domain <[10].[1]>
-
address@hidden, Aliens: Sam <@[matrix (smtp)]: address@hidden>, 
address@hidden;=> pcount 3
-1 email <address@hidden>
-   local-part <lo> domain <hi>
-2 email <address@hidden>
-   personal <Sam>
-   local-part <sam> domain <sam>
-   route <@[matrix (smtp)]>
-3 email <address@hidden>
-   local-part <sroberts> domain <[10].[1]>
-
-Aliens: Sam <@[matrix (smtp)]: address@hidden>, address@hidden;, 
address@hidden> pcount 3
-1 email <address@hidden>
-   personal <Sam>
-   local-part <sam> domain <sam>
-   route <@[matrix (smtp)]>
-2 email <address@hidden>
-   local-part <sroberts> domain <[10].[1]>
-3 email <address@hidden>
-   local-part <hi> domain <lo>
-
address@hidden, Aliens: Sam <@[matrix (smtp)]: address@hidden>, 
address@hidden;, address@hidden> pcount 4
-1 email <address@hidden>
-   local-part <lo> domain <hi>
-2 email <address@hidden>
-   personal <Sam>
-   local-part <sam> domain <sam>
-   route <@[matrix (smtp)]>
-3 email <address@hidden>
-   local-part <sroberts> domain <[10].[1]>
-4 email <address@hidden>
-   local-part <hi> domain <lo>
-
-Sam <@mail2.uniserve.com:address@hidden>=> pcount 1
-1 email <address@hidden>
-   personal <Sam>
-   local-part <sroberts> domain <uniserve.com>
-   route <@mail2.uniserve.com>
-
-< (hey) @ (hey, )smtp1.sympatico.ca, mail2.uniserve.com 
(hoo!):address@hidden>=> error MU_ERR_BAD_822_FORMAT
-
address@hidden (Hardware Support Account)=> pcount 1
-1 email <address@hidden>
-   personal <Hardware Support Account>
-   local-part <hw> domain <570.com>
-
address@hidden (=?ISO-8859-1?Q?Claus_F=E4rber?=)=> pcount 1
-1 email <address@hidden>
-   personal <=?ISO-8859-1?Q?Claus_F=E4rber?=>
-   local-part <list-ietf-wg-apps-drums> domain <faerber.muc.de>
-
-<address@hidden>(mutt #369), address@hidden (#369)=> pcount 2
-1 email <address@hidden>
-   local-part <mutt-dev> domain <mutt.org>
-2 email <address@hidden>
-   personal <#369>
-   local-part <guug-bugs-closed> domain <guug.de>
-
-"'Aernoudt Bottemanne'"         <address@hidden>=> pcount 1
-1 email <address@hidden>
-   personal <'Aernoudt Bottemanne'>
-   local-part <Aernoudt.Bottemanne> domain <Informix.com>
-
-"'Haag, Ullrich - MBDC'" <address@hidden>,=> pcount 1
-1 email <address@hidden>
-   personal <'Haag, Ullrich - MBDC'>
-   local-part <Ullrich.Haag> domain <MBDC.com>
-
-"'Michael C. Ibarra'" <address@hidden>, address@hidden, Al <address@hidden>=> 
pcount 3
-1 email <address@hidden>
-   personal <'Michael C. Ibarra'>
-   local-part <ibarra> domain <hawk.com>
-2 email <address@hidden>
-   local-part <arl> domain <q7.net>
-3 email <address@hidden>
-   personal <Al>
-   local-part <arl> domain <q7.net>
-
-"'Sam Roberts'" <address@hidden>=> pcount 1
-1 email <address@hidden>
-   personal <'Sam Roberts'>
-   local-part <sam> domain <cogent.ca>
-
-"'address@hidden'" <address@hidden>,=> pcount 1
-1 email <address@hidden>
-   personal <'address@hidden'>
-   local-part <paul> domain <pitbull-productions.com>
-
-"'address@hidden'" <address@hidden>, "'address@hidden'"=> error 
MU_ERR_BAD_822_FORMAT
-
-"'address@hidden'" <address@hidden>=> pcount 1
-1 email <address@hidden>
-   personal <'address@hidden'>
-   local-part <sroberts> domain <certicom.ca>
-
-"=?iso-8859-1?Q?Juan_Carlos_Marcos_Rodr=EDguez?=" <address@hidden>=> pcount 1
-1 email <address@hidden>
-   personal <=?iso-8859-1?Q?Juan_Carlos_Marcos_Rodr=EDguez?=>
-   local-part <jcmarcos> domain <datavoice.es>
-
-"Christian Edward Gruber" <address@hidden>,=> pcount 1
-1 email <address@hidden>
-   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" <address@hidden>, address@hidden> pcount 2
-1 email <address@hidden>
-   personal <D. J. Bernstein>
-   local-part <djb> domain <cr.yp.to>
-2 email <address@hidden>
-   local-part <drums> domain <cs.utk.edu>
-
-"Dave Sill <de5-drums" <address@hidden>=> pcount 1
-1 email <address@hidden>
-   personal <Dave Sill <de5-drums>
-   local-part <de5-drums> domain <sws5.ctd.ornl.gov>
-
-"Dave \(work\) Baerg \(E-mail\)" <address@hidden>=> pcount 1
-1 email <address@hidden>
-   personal <Dave (work) Baerg (E-mail)>
-   local-part <Dave.Baerg> domain <SUMMedia.com>
-
-"Demian" <address@hidden>=> pcount 1
-1 email <address@hidden>
-   personal <Demian>
-   local-part <damient> domain <wave.home.com>
-
-"Detailed Revision/Update of Message Standards" <address@hidden>=> pcount 1
-1 email <address@hidden>
-   personal <Detailed Revision/Update of Message Standards>
-   local-part <drums> domain <cs.utk.edu>
-
-"Fred" <address@hidden>=> pcount 1
-1 email <address@hidden>
-   personal <Fred>
-   local-part <fprog> domain <__nowhere__.users.sourceforge.net>
-
-"Haag, Ullrich - MBDC" <address@hidden>=> pcount 1
-1 email <address@hidden>
-   personal <Haag, Ullrich - MBDC>
-   local-part <Ullrich.Haag> domain <MBDC.com>
-
-"Jacob Palme" <address@hidden>, <address@hidden>=> pcount 2
-1 email <address@hidden>
-   personal <Jacob Palme>
-   local-part <jpalme> domain <dsv.su.se>
-2 email <address@hidden>
-   local-part <drums> domain <cs.utk.edu>
-
-"Jakob 'sparky' Kaivo" <address@hidden>=> pcount 1
-1 email <address@hidden>
-   personal <Jakob 'sparky' Kaivo>
-   local-part <jkaivo> domain <elijah.nodomainname.net>
-
-"Lee R. Copp" <address@hidden>=> pcount 1
-1 email <address@hidden>
-   personal <Lee R. Copp>
-   local-part <Lee.R.Copp> domain <MichiganScientific.com>
-
-"Lionel Johnson" <address@hidden>=> pcount 1
-1 email <address@hidden>
-   personal <Lionel Johnson>
-   local-part <ljohnson**nospam**> domain <sterling1.com>
-
-"Martin \[Keso\] Keseg" <address@hidden>=> pcount 1
-1 email <address@hidden>
-   personal <Martin [Keso] Keseg>
-   local-part <Martin.Keseg> domain <slovakia.sun.com>
-
-#FIXME: there is no way to send } to the remote program...
-"]\{ristoph" <address@hidden>=> pcount 1
-1 email <address@hidden>
-   personal <]{ristoph>
-   local-part <news2> domain <kristoph.net>
-
-"fmartens-2000" <address@hidden>=> pcount 1
-1 email <address@hidden>
-   personal <fmartens-2000>
-   local-part <fmartens-2000> domain <planet.nl>
-
-"g'o'tz ohnesorge" <address@hidden>=> pcount 1
-1 email <address@hidden>
-   personal <g'o'tz ohnesorge>
-   local-part <gohnesorge> domain <lh-computertechnik.de>
-
-"gao jie" <address@hidden>=> pcount 1
-1 email <address@hidden>
-   personal <gao jie>
-   local-part <jiegi> domain <public.wh.hb.cn>
-
-"address@hidden" <address@hidden>=> pcount 1
-1 email <address@hidden>
-   personal <address@hidden>
-   local-part <gnupg-devel%gnupg.org> domain <f48.n48.z2.fidonet.org>
-
-"gpg-devel" <address@hidden>=> pcount 1
-1 email <address@hidden>
-   personal <gpg-devel>
-   local-part <gnupg-devel> domain <gnupg.org>
-
-"jigang" <address@hidden>=> pcount 1
-1 email <address@hidden>
-   personal <jigang>
-   local-part <jigang> domain <jinglun.com.cn>
-
-"address@hidden" <address@hidden>=> pcount 1
-1 email <address@hidden>
-   personal <address@hidden>
-   local-part <misc> domain <openbsd.org>
-
-"address@hidden" <address@hidden>, address@hidden> pcount 2
-1 email <address@hidden>
-   personal <address@hidden>
-   local-part <misc> domain <openbsd.org>
-2 email <address@hidden>
-   local-part <brian> domain <Awfulhak.org>
-
-"mutt-dev @ mutt . orgThomas Roessler" <address@hidden>=> pcount 1
-1 email <address@hidden>
-   personal <mutt-dev @ mutt . orgThomas Roessler>
-   local-part <roessler> domain <does-not-exist.org>
-
-"address@hidden" <address@hidden>=> pcount 1
-1 email <address@hidden>
-   personal <address@hidden>
-   local-part <zwk%f36.n480.z2.fidonet.org> domain <f36.n480.z2.fidonet.org>
-
-'Dan Dall'Acqua' <address@hidden>, 'Dave Shyong'=> error MU_ERR_BAD_822_FORMAT
-
address@hidden> pcount 1
-1 email <address@hidden>
-   local-part <0xdeadbeef-request> domain <petting-zoo.net>
-
address@hidden> pcount 1
-1 email <address@hidden>
-   local-part <102023-00406421> domain <cnxt19932218.conexant.com>
-
address@hidden> pcount 1
-1 email <address@hidden>
-   local-part <218164.24.43> domain <jobcontrolcenter.com>
-
-<address@hidden>=> pcount 1
-1 email <address@hidden>
-   local-part <0xdeadbeef-request> domain <petting-zoo.net>
-
-<>=> pcount 1
-1 email <>
-
-<address@hidden>=> pcount 1
-1 email <address@hidden>
-   local-part <Christia.Roberts> domain <nrc.ca>
-
-<address@hidden>=> pcount 1
-1 email <address@hidden>
-   local-part <Nick_Shelness> domain <motorcity2.lotus.com>
-
-<all: >=> error MU_ERR_BAD_822_FORMAT
-
-<address@hidden>=> pcount 1
-1 email <address@hidden>
-   local-part <fyi-admin> domain <emyr.net>
-
-<address@hidden>, <address@hidden>,=> pcount 2
-1 email <address@hidden>
-   local-part <gary.stefanov> domain <medtronic.com>
-2 email <address@hidden>
-   local-part <HdeVisse> domain <husky.ca>
-
-<address@hidden>=> pcount 1
-1 email <address@hidden>
-   local-part <gnu-pop-list> domain <nodomainname.net>
-
-<address@hidden>=> pcount 1
-1 email <address@hidden>
-   local-part <mutt-dev-owner-sroberts=uniserve.com> domain <ns.gbnet.net>
-
-=?ISO-8859-1?Q?Kolbj=F8rn_Barmen?= <address@hidden>=> pcount 1
-1 email <address@hidden>
-   personal <=?ISO-8859-1?Q?Kolbj=F8rn_Barmen?=>
-   local-part <kolla> domain <nvg.ntnu.no>
-
-=?ISO-8859-1?Q?Patrik_F=E4ltstr=F6m?= <address@hidden>=> pcount 1
-1 email <address@hidden>
-   personal <=?ISO-8859-1?Q?Patrik_F=E4ltstr=F6m?=>
-   local-part <paf> domain <cisco.com>
-
-=?ISO-8859-1?Q?Patrik_F=E4ltstr=F6m?= <address@hidden>,=> pcount 1
-1 email <address@hidden>
-   personal <=?ISO-8859-1?Q?Patrik_F=E4ltstr=F6m?=>
-   local-part <paf> domain <cisco.com>
-
-=?US-ASCII?Q?gary=5Fc?= <address@hidden>=> pcount 1
-1 email <address@hidden>
-   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 <address@hidden>=> pcount 1
-1 email <address@hidden>
-   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 <address@hidden>,=> pcount 1
-1 email <address@hidden>
-   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?= <address@hidden>=> pcount 1
-1 email <address@hidden>
-   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?= <address@hidden>=> pcount 1
-1 email <address@hidden>
-   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?= <address@hidden>=> pcount 1
-1 email <address@hidden>
-   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?= <address@hidden>=> pcount 1
-1 email <address@hidden>
-   personal <=?iso-8859-1?Q?Mikko_H=E4nninen?=>
-   local-part <Mikko.Hanninen> domain <dna.fi>
-
-=?iso-8859-1?Q?Mikko_H=E4nninen?= <address@hidden>=> pcount 1
-1 email <address@hidden>
-   personal <=?iso-8859-1?Q?Mikko_H=E4nninen?=>
-   local-part <Mikko.Hanninen> domain <iki.fi>
-
-=?iso-8859-1?Q?R=E9mi_Guyomarch?= <address@hidden>=> pcount 1
-1 email <address@hidden>
-   personal <=?iso-8859-1?Q?R=E9mi_Guyomarch?=>
-   local-part <rguyom> domain <321.net>
-
-=?iso-8859-1?Q?Ulf_M=F6ller?= <address@hidden>=> pcount 1
-1 email <address@hidden>
-   personal <=?iso-8859-1?Q?Ulf_M=F6ller?=>
-   local-part <ulf> domain <fitug.de>
-
-ANDREW MARTIN <address@hidden>=> pcount 1
-1 email <address@hidden>
-   personal <ANDREW MARTIN>
-   local-part <amartin> domain <ee.ryerson.ca>
-
-Abhay Ghaisas <address@hidden>, address@hidden> pcount 2
-1 email <address@hidden>
-   personal <Abhay Ghaisas>
-   local-part <abhay> domain <sobolev.does-not-exist.org>
-2 email <address@hidden>
-   local-part <mutt-dev> domain <mutt.org>
-
-Brian Salter-Duke <address@hidden>=> pcount 1
-1 email <address@hidden>
-   personal <Brian Salter-Duke>
-   local-part <b_duke> domain <lacebark.ntu.edu.au>
-
-Catharine Shyong <address@hidden>=> pcount 1
-1 email <address@hidden>
-   personal <Catharine Shyong>
-   local-part <shyong> domain <t-iii.com>
-
-DRUMS-Last-Call:;=> error MU_ERR_EMPTY_ADDRESS
-
-Detailed Revision/Update of Message Standards <address@hidden>=> pcount 1
-1 email <address@hidden>
-   personal <Detailed Revision/Update of Message Standards>
-   local-part <drums> domain <cs.utk.edu>
-
-Eric Allman <address@hidden>=> pcount 1
-1 email <address@hidden>
-   personal <Eric Allman>
-   local-part <eric+ietf> domain <Sendmail.ORG>
-
-Gary <address@hidden>=> pcount 1
-1 email <address@hidden>
-   personal <Gary>
-   local-part <Gary> domain <e-c-s-uk.com>
-
-IETF working group on revision of mail standards <address@hidden>=> pcount 1
-1 email <address@hidden>
-   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:;, address@hidden> pcount 1
-1 email <address@hidden>
-   local-part <drums> domain <cs.utk.edu>
-
-Jean-Baptiste Marchand <address@hidden>=> pcount 1
-1 email <address@hidden>
-   personal <Jean-Baptiste Marchand>
-   local-part <Jean-Baptiste.Marchand> domain <epita.fr>
-
-Jonathan Rozes <address@hidden>=> pcount 1
-1 email <address@hidden>
-   personal <Jonathan Rozes>
-   local-part <jrozes+969649116.89117462> domain <vinton.com>
-
-Jose "C." Garcia Sogo<address@hidden>=> pcount 1
-1 email <address@hidden>
-   personal <Jose C. Garcia Sogo>
-   local-part <jose> domain <jaimedelamo.eu.org>
-
-Marco d'Itri <address@hidden>=> pcount 1
-1 email <address@hidden>
-   personal <Marco d'Itri>
-   local-part <md> domain <Linux.IT>
-
address@hidden> pcount 1
-1 email <address@hidden>
-   local-part <No_Reply-To> domain <mapquest.com>
-
address@hidden, address@hidden, boot=> pcount 3
-1 email <address@hidden>
-   local-part <OSULLIE> domain <rte.ie>
-2 email <address@hidden>
-   local-part <skidswam> domain <hotmail.com>
-3 email <address@hidden>
-   local-part <boot>
-
-Paul Hoffman / IMC <address@hidden>=> pcount 1
-1 email <address@hidden>
-   personal <Paul Hoffman / IMC>
-   local-part <phoffman> domain <imc.org>
-
-Sam=> pcount 1
-1 email <address@hidden>
-   local-part <Sam>
-
-Sam Roberts <address@hidden>=> pcount 1
-1 email <address@hidden>
-   personal <Sam Roberts>
-   local-part <sam> domain <cogent.ca>
-
-Sam_Roberts/address@hidden> pcount 1
-1 email <Sam_Roberts/address@hidden>
-   local-part <Sam_Roberts/Certicom%Certicom> domain <certicom.com>
-
-Thomas Roessler <address@hidden>, address@hidden> pcount 2
-1 email <address@hidden>
-   personal <Thomas Roessler>
-   local-part <roessler> domain <does-not-exist.org>
-2 email <address@hidden>
-   local-part <490> domain <bugs.guug.de>
-
-Thomas Roessler <address@hidden>, address@hidden> pcount 2
-1 email <address@hidden>
-   personal <Thomas Roessler>
-   local-part <roessler> domain <does-not-exist.org>
-2 email <address@hidden>
-   local-part <g10> domain <gnupg.org>
-
address@hidden> pcount 1
-1 email <address@hidden>
-   local-part <ddickey> domain <ip-12-22-50-150.hqglobal.net>
-
-ktb <address@hidden>=> pcount 1
-1 email <address@hidden>
-   personal <ktb>
-   local-part <x.y.f> domain <home.com>
-
address@hidden, address@hidden, Kieran.O'address@hidden,=> pcount 3
-1 email <address@hidden>
-   local-part <mcaustin> domain <eudoramail.com>
-2 email <address@hidden>
-   local-part <aposner> domain <usaid.gov>
-3 email <Kieran.O'address@hidden>
-   local-part <Kieran.O'Leary> domain <anpost.ie>
-
address@hidden@dikke.penguin.nl=> error MU_ERR_BAD_822_FORMAT
-
-root=> pcount 1
-1 email <address@hidden>
-   local-part <root>
-
-srr <address@hidden>=> error MU_ERR_BAD_822_FORMAT
-
-whom it may concern: ;;whom.it.may.concern: ;=> error MU_ERR_BAD_822_FORMAT
-
-whom it may concern: address@hidden, address@hidden;=> pcount 2
-1 email <address@hidden>
-   local-part <mutt-dev> domain <mutt.org>
-2 email <address@hidden>
-   local-part <mutt-users> domain <mutt.org>
-
-Sergey V. Poznyakoff <address@hidden>=> pcount 1
-1 email <address@hidden>
-   personal <Sergey V. Poznyakoff>
-   local-part <gray> domain <gnu.org>
-
-P. D. Q. Bach <address@hidden>=> pcount 1
-1 email <address@hidden>
-   personal <P. D. Q. Bach>
-   local-part <bach> domain <somewhere.org>
-
-"A bad quote\" <address@hidden>=> error MU_ERR_BAD_822_FORMAT
-
-# NOTE: This file must end with an empty line
diff --git a/mailbox/testsuite/Argcv b/mailbox/testsuite/Argcv
deleted file mode 100644
index 076edc9..0000000
--- a/mailbox/testsuite/Argcv
+++ /dev/null
@@ -1,52 +0,0 @@
-# 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: "\""
diff --git a/mailbox/testsuite/Decode2047 b/mailbox/testsuite/Decode2047
deleted file mode 100644
index 96bd334..0000000
--- a/mailbox/testsuite/Decode2047
+++ /dev/null
@@ -1,36 +0,0 @@
-# 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?= <address@hidden> => Success
-Keith Moore <address@hidden>
-
-=?ISO-8859-1?Q?Keld_J=F8rn_Simonsen?= <address@hidden> => Success
-Keld J\370rn Simonsen <address@hidden>
-
-=?ISO-8859-1?Q?Andr=E9?= Pirard <address@hidden> => Success
-Andr\351 Pirard <address@hidden>
-
-=?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
diff --git a/mailbox/testsuite/Encode2047 b/mailbox/testsuite/Encode2047
deleted file mode 100644
index de098ec..0000000
--- a/mailbox/testsuite/Encode2047
+++ /dev/null
@@ -1,27 +0,0 @@
-# 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
diff --git a/mailbox/testsuite/Mailcap b/mailbox/testsuite/Mailcap
deleted file mode 100644
index a8dcb4e..0000000
--- a/mailbox/testsuite/Mailcap
+++ /dev/null
@@ -1,195 +0,0 @@
-# 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
diff --git a/mailbox/testsuite/Makefile.am b/mailbox/testsuite/Makefile.am
deleted file mode 100644
index fb30e88..0000000
--- a/mailbox/testsuite/Makefile.am
+++ /dev/null
@@ -1,92 +0,0 @@
-## 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 ##' > 
address@hidden
-       @echo '# Do not edit here.  If you wish to override these values' >> 
address@hidden
-       @echo '# edit the last section' >> address@hidden
-       @echo 'set tool $(DEJATOOL)' >> address@hidden
-       @echo "set top_srcdir `cd $(top_srcdir); pwd`" >> address@hidden
-       @echo "set top_builddir `cd $(top_builddir); pwd`" >> address@hidden
-       @echo "set srcdir `cd $(srcdir); pwd`" >> address@hidden
-       @echo 'set objdir' `pwd` >> address@hidden
-       @echo 'set host_alias "$(host_alias)"' >> address@hidden
-       @echo 'set host_triplet $(host_triplet)' >> address@hidden
-       @echo 'set target_alias "$(target_alias)"' >> address@hidden
-       @echo 'set target_triplet $(target_triplet)' >> address@hidden
-       @echo 'set build_alias "$(build_alias)"' >> address@hidden
-       @echo 'set build_triplet $(build_triplet)' >> address@hidden
-       @echo '## All variables above are generated by configure. Do Not Edit 
##' >> address@hidden
-       @test ! -f site.exp || sed '1,/^## All variables above are.*##/ d' 
site.exp >> address@hidden
-       @test ! -f site.exp || mv site.exp site.bak
-       @mv address@hidden 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.' 
>> address@hidden
-       @echo '## Please, read file README in this directory for instructions' 
>> address@hidden
-       @echo '## on how to use this file' >> address@hidden
-       @echo "set host_board `hostname`" >> address@hidden
-       @echo 'set board_info($$host_board,connect) rlogin' >> address@hidden
-       @echo 'set board_info($$host_board,shell_prompt) "\\$$ "' >> 
address@hidden
-       @echo "set board_info(\$$host_board,top_srcdir) `cd $(top_srcdir); 
pwd`" >> address@hidden
-       @echo "set board_info(\$$host_board,top_builddir) `cd $(top_builddir); 
pwd`" >> address@hidden
-       @echo "set board_info(\$$host_board,srcdir) `cd $(srcdir); pwd`" >> 
address@hidden
-       @echo "set board_info(\$$host_board,objdir) `pwd`" >> address@hidden
-       @echo "set board_info(\$$host_board,top_srcdir) `cd $(top_srcdir); 
pwd`" >> address@hidden
-       @echo "set board_info(\$$host_board,top_builddir) `cd $(top_builddir); 
pwd`" >> address@hidden
-       @test ! -f remote.exp || mv remote.exp remote.bak
-       @mv address@hidden remote.exp
-
-
-DISTCLEANFILES=*.exp *.log *.sum 
-
-distclean-local:
-       -rm -rf data
diff --git a/mailbox/testsuite/Urls b/mailbox/testsuite/Urls
deleted file mode 100644
index a6e565e..0000000
--- a/mailbox/testsuite/Urls
+++ /dev/null
@@ -1,629 +0,0 @@
-# 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:address@hidden => SUCCESS
-       scheme <scheme>
-       user <user>
-       passwd <pass>
-       auth <>
-       host <host>
-       port 0
-       path <>
-
-ftp://user:address@hidden//a/path => SUCCESS
-       scheme <ftp>
-       user <user>
-       passwd <pass>
-       auth <>
-       host <host>
-       port 0
-       path </a/path>
-
-ftp://:address@hidden//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:address@hidden/a/path => SUCCESS
-       scheme <ftp>
-       user <user>
-       passwd <pass>
-       auth <>
-       host <host>
-       port 0
-       path <a/path>
-
-ftp://:address@hidden/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://address@hidden => SUCCESS
-       scheme <pop>
-       user <user>
-       passwd <>
-       auth <>
-       host <pop.example.net>
-       port 0
-       path <>
-
-pop://user:address@hidden => SUCCESS
-       scheme <pop>
-       user <user>
-       passwd <passwd>
-       auth <>
-       host <pop.example.net>
-       port 0
-       path <>
-
-pop://user;address@hidden => 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://address@hidden:111 => SUCCESS
-       scheme <pop>
-       user <user>
-       passwd <>
-       auth <>
-       host <pop.example.net>
-       port 111
-       path <>
-
-pop://user:address@hidden:111 => SUCCESS
-       scheme <pop>
-       user <user>
-       passwd <passwd>
-       auth <>
-       host <pop.example.net>
-       port 111
-       path <>
-
-pop://user;address@hidden: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://address@hidden => SUCCESS
-       scheme <imap>
-       user <user>
-       passwd <>
-       auth <>
-       host <imap.example.net>
-       port 0
-       path <>
-
-imap://user:address@hidden => SUCCESS
-       scheme <imap>
-       user <user>
-       passwd <passwd>
-       auth <>
-       host <imap.example.net>
-       port 0
-       path <>
-
-imap://user;address@hidden => 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://address@hidden:111 => SUCCESS
-       scheme <imap>
-       user <user>
-       passwd <>
-       auth <>
-       host <imap.example.net>
-       port 111
-       path <>
-
-imap://user:address@hidden:111 => SUCCESS
-       scheme <imap>
-       user <user>
-       passwd <passwd>
-       auth <>
-       host <imap.example.net>
-       port 111
-       path <>
-
-imap://user;address@hidden: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://address@hidden/mbox => SUCCESS
-       scheme <imap>
-       user <user>
-       passwd <>
-       auth <>
-       host <imap.example.net>
-       port 0
-       path <mbox>
-
-imap://user:address@hidden/mbox => SUCCESS
-       scheme <imap>
-       user <user>
-       passwd <passwd>
-       auth <>
-       host <imap.example.net>
-       port 0
-       path <mbox>
-
-imap://user;address@hidden/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://address@hidden:111/mbox => SUCCESS
-       scheme <imap>
-       user <user>
-       passwd <>
-       auth <>
-       host <imap.example.net>
-       port 111
-       path <mbox>
-
-imap://user:address@hidden:111/mbox => SUCCESS
-       scheme <imap>
-       user <user>
-       passwd <passwd>
-       auth <>
-       host <imap.example.net>
-       port 111
-       path <mbox>
-
-imap://user;address@hidden:111/mbox => SUCCESS
-       scheme <imap>
-       user <user>
-       passwd <>
-       auth <*>
-       host <imap.example.net>
-       port 111
-       path <mbox>
-
-imap://imap.example.net/mbox/address@hidden => SUCCESS
-       scheme <imap>
-       user <imap.example.net/mbox/user>
-       passwd <>
-       auth <>
-       host <host>
-       port 0
-       path <>
-
-imap://address@hidden/mbox/address@hidden => SUCCESS
-       scheme <imap>
-       user <user>
-       passwd <>
-       auth <>
-       host <imap.example.net>
-       port 0
-       path <mbox/address@hidden>
-
-imap://user:address@hidden/mbox/address@hidden => SUCCESS
-       scheme <imap>
-       user <user>
-       passwd <passwd>
-       auth <>
-       host <imap.example.net>
-       port 0
-       path <mbox/address@hidden>
-
-imap://user;address@hidden/mbox/address@hidden => SUCCESS
-       scheme <imap>
-       user <user>
-       passwd <>
-       auth <*>
-       host <imap.example.net>
-       port 0
-       path <mbox/address@hidden>
-
-imap://imap.example.net:111/mbox/address@hidden => SUCCESS
-       scheme <imap>
-       user <imap.example.net>
-       passwd <111/mbox/user>
-       auth <>
-       host <host>
-       port 0
-       path <>
-
-imap://address@hidden:111/mbox/address@hidden => SUCCESS
-       scheme <imap>
-       user <user>
-       passwd <>
-       auth <>
-       host <imap.example.net>
-       port 111
-       path <mbox/address@hidden>
-
-imap://user:address@hidden:111/mbox/address@hidden => SUCCESS
-       scheme <imap>
-       user <user>
-       passwd <passwd>
-       auth <>
-       host <imap.example.net>
-       port 111
-       path <mbox/address@hidden>
-
-imap://user;address@hidden:111/mbox/address@hidden => SUCCESS
-       scheme <imap>
-       user <user>
-       passwd <>
-       auth <*>
-       host <imap.example.net>
-       port 111
-       path <mbox/address@hidden>
-
-ftp://ftp.example.org/mbox/user%40host => SUCCESS
-       scheme <ftp>
-       user <>
-       passwd <>
-       auth <>
-       host <ftp.example.org>
-       port 0
-       path <mbox/address@hidden>
-
-ftp://ftp.example.org:111/mbox/user%40host => SUCCESS
-       scheme <ftp>
-       user <>
-       passwd <>
-       auth <>
-       host <ftp.example.org>
-       port 111
-       path <mbox/address@hidden>
-
-ftp://ftp.example.org:111/mbox/user%40host;type=pass => SUCCESS
-       scheme <ftp>
-       user <>
-       passwd <>
-       auth <>
-       host <ftp.example.org>
-       port 111
-       path <mbox/address@hidden>
-       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
diff --git a/mailbox/testsuite/lib/DISTFILES b/mailbox/testsuite/lib/DISTFILES
deleted file mode 100644
index b42768e..0000000
--- a/mailbox/testsuite/lib/DISTFILES
+++ /dev/null
@@ -1 +0,0 @@
-mailbox.exp
diff --git a/mailbox/testsuite/lib/mailbox.exp 
b/mailbox/testsuite/lib/mailbox.exp
deleted file mode 100644
index abc273e..0000000
--- a/mailbox/testsuite/lib/mailbox.exp
+++ /dev/null
@@ -1,243 +0,0 @@
-# -*- 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
-}
diff --git a/mailbox/testsuite/mailbox/DISTFILES 
b/mailbox/testsuite/mailbox/DISTFILES
deleted file mode 100644
index 55cc9e1..0000000
--- a/mailbox/testsuite/mailbox/DISTFILES
+++ /dev/null
@@ -1,9 +0,0 @@
-address.exp
-argcv.exp
-base64.exp
-decode2047.exp
-encode2047.exp
-list.exp
-mailcap.exp
-mime.exp
-url.exp 
diff --git a/mailbox/testsuite/mailbox/address.exp 
b/mailbox/testsuite/mailbox/address.exp
deleted file mode 100644
index 2809580..0000000
--- a/mailbox/testsuite/mailbox/address.exp
+++ /dev/null
@@ -1,48 +0,0 @@
-# -*- 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
diff --git a/mailbox/testsuite/mailbox/argcv.exp 
b/mailbox/testsuite/mailbox/argcv.exp
deleted file mode 100644
index 88db5e1..0000000
--- a/mailbox/testsuite/mailbox/argcv.exp
+++ /dev/null
@@ -1,55 +0,0 @@
-# -*- 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
diff --git a/mailbox/testsuite/mailbox/base64.exp 
b/mailbox/testsuite/mailbox/base64.exp
deleted file mode 100644
index b86ca6f..0000000
--- a/mailbox/testsuite/mailbox/base64.exp
+++ /dev/null
@@ -1,37 +0,0 @@
-# -*- 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:;<=>address@hidden|}~\\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
diff --git a/mailbox/testsuite/mailbox/decode2047.exp 
b/mailbox/testsuite/mailbox/decode2047.exp
deleted file mode 100644
index b91fa65..0000000
--- a/mailbox/testsuite/mailbox/decode2047.exp
+++ /dev/null
@@ -1,50 +0,0 @@
-# -*- 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
diff --git a/mailbox/testsuite/mailbox/encode2047.exp 
b/mailbox/testsuite/mailbox/encode2047.exp
deleted file mode 100644
index d696130..0000000
--- a/mailbox/testsuite/mailbox/encode2047.exp
+++ /dev/null
@@ -1,62 +0,0 @@
-# -*- 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
diff --git a/mailbox/testsuite/mailbox/list.exp 
b/mailbox/testsuite/mailbox/list.exp
deleted file mode 100644
index acb7bb2..0000000
--- a/mailbox/testsuite/mailbox/list.exp
+++ /dev/null
@@ -1,330 +0,0 @@
-# -*- 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
diff --git a/mailbox/testsuite/mailbox/mailcap.exp 
b/mailbox/testsuite/mailbox/mailcap.exp
deleted file mode 100644
index eaed867..0000000
--- a/mailbox/testsuite/mailbox/mailcap.exp
+++ /dev/null
@@ -1,71 +0,0 @@
-# -*- 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
diff --git a/mailbox/testsuite/mailbox/mime.exp 
b/mailbox/testsuite/mailbox/mime.exp
deleted file mode 100644
index aabecfe..0000000
--- a/mailbox/testsuite/mailbox/mime.exp
+++ /dev/null
@@ -1,39 +0,0 @@
-# -*- 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
diff --git a/mailbox/testsuite/mailbox/url.exp 
b/mailbox/testsuite/mailbox/url.exp
deleted file mode 100644
index f390306..0000000
--- a/mailbox/testsuite/mailbox/url.exp
+++ /dev/null
@@ -1,48 +0,0 @@
-# -*- 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
diff --git a/messages/Makefile.am b/messages/Makefile.am
index c9edf35..a6e49ac 100644
--- a/messages/Makefile.am
+++ b/messages/Makefile.am
@@ -20,7 +20,7 @@
 
 INCLUDES = @MU_APP_COMMON_INCLUDES@ 
 
-SUBDIRS = testsuite
+SUBDIRS = tests
 
 bin_PROGRAMS = messages
 messages_SOURCES = messages.c
diff --git a/frm/tests/.gitignore b/messages/tests/.gitignore
similarity index 86%
copy from frm/tests/.gitignore
copy to messages/tests/.gitignore
index 33e4e9a..93f8f46 100644
--- a/frm/tests/.gitignore
+++ b/messages/tests/.gitignore
@@ -1,7 +1,6 @@
 atconfig
 atlocal
 package.m4
-status.mf
 testsuite
 testsuite.dir
 testsuite.log
diff --git a/frm/tests/Makefile.am b/messages/tests/Makefile.am
similarity index 97%
copy from frm/tests/Makefile.am
copy to messages/tests/Makefile.am
index 647d108..be7ac10 100644
--- a/frm/tests/Makefile.am
+++ b/messages/tests/Makefile.am
@@ -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],      address@hidden@])'; \
          echo 'm4_define([AT_PACKAGE_TARNAME],   address@hidden@])'; \
diff --git a/readmsg/tests/atlocal.in b/messages/tests/atlocal.in
similarity index 76%
copy from readmsg/tests/atlocal.in
copy to messages/tests/atlocal.in
index aa0ba44..31b50ea 100644
--- a/readmsg/tests/atlocal.in
+++ b/messages/tests/atlocal.in
@@ -2,6 +2,8 @@
 # Configurable variable values for Mailutils test suite.
 # Copyright (C) 2004, 2010 Free Software Foundation, Inc.
 
address@hidden@:@abs_top_builddir@/readmsg:$top_srcdir:$srcdir:$PATH
address@hidden@:@abs_top_builddir@/messages:$top_srcdir:$srcdir:$PATH
 address@hidden@
 address@hidden@
+
+  
\ No newline at end of file
diff --git a/readmsg/tests/testsuite.at b/messages/tests/testsuite.at
similarity index 62%
copy from readmsg/tests/testsuite.at
copy to messages/tests/testsuite.at
index e7e63f0..fe0eaca 100644
--- a/readmsg/tests/testsuite.at
+++ b/messages/tests/testsuite.at
@@ -15,40 +15,52 @@
 # along with GNU Mailutils.  If not, see <http://www.gnu.org/licenses/>.
 # This file is part of Mailfromd testsuite. 
 
-# Require a reasonably recent autotest.
-m4_version_prereq([2.52g])
 m4_include([testsuite.inc])
 
 dnl ------------------------------------------------------------
-dnl READMSG_MAILBOX  -- mailbox used for testing
-m4_define([READMSG_MAILBOX],[mbox1])
+dnl MSG_MAILBOX  -- mailbox used for testing
+m4_define([MSG_MAILBOX],[mbox1])
 
 dnl ------------------------------------------------------------
-dnl READMSG_OPTIONS  -- default options for readmsg
-m4_define([READMSG_OPTIONS],[--no-site --no-user])
+dnl MSG_OPTIONS  -- default options for frm
+m4_define([MSG_OPTIONS],[--no-site --no-user])
 
 dnl ------------------------------------------------------------
-dnl READMSGTEST(DESCR, KW, CMDLINE, [STATUS = `0'], [STDOUT = `'],
+dnl MSGTEST(DESCR, KW, CMDLINE, [STATUS = `0'], [STDOUT = `'],
 dnl         [STDERR = `'], [RUN-IF-FAIL], [RUN-IF-PASS])
 dnl
-m4_define([READMSGTEST],[
+m4_define([MSGTEST],[
 AT_SETUP([$1])
-AT_KEYWORDS([$2])
+AT_KEYWORDS([messages $2])
 AT_CHECK([
-MAIL=$top_srcdir/testsuite/spool/READMSG_MAILBOX
+MAIL=$top_srcdir/testsuite/spool/MSG_MAILBOX
 FOLDER=$MAIL
 export MAIL FOLDER
-readmsg READMSG_OPTIONS $3],
+messages MSG_OPTIONS $3 | sed 's|in /.*/|in |'],
 m4_shift(m4_shift(m4_shift($@))))
 AT_CLEANUP])
 
 AT_INIT
 
-AT_TESTED([readmsg])
+AT_TESTED([messages])
+
+MUT_VERSION(messages)
+
+MSGTEST([messages],[messages00],
+[],
+[0],
+[Number of messages in mbox1: 5
+])
+
+MSGTEST([messages -q],[messages01 messages-q],
+[-q],
+[0],
+[5
+])
+
+MSGTEST([messages 2],[messages02],
+[--set ":mailbox:folder=$top_srcdir/testsuite/spool" +teaparty.mbox],
+[0],
+[Number of messages in teaparty.mbox: 95
+])
 
-MUT_VERSION(readmsg)
-m4_include([all.at])
-m4_include([twomsg.at])
-m4_include([hdr.at])
-m4_include([nohdr.at])
-m4_include([weed.at])
diff --git a/messages/testsuite/.gitignore b/messages/testsuite/.gitignore
deleted file mode 100644
index 989f590..0000000
--- a/messages/testsuite/.gitignore
+++ /dev/null
@@ -1,7 +0,0 @@
-Makefile
-Makefile.in
-*.log
-*.sum
-site.exp
-remote.exp
-data
diff --git a/messages/testsuite/Makefile.am b/messages/testsuite/Makefile.am
deleted file mode 100644
index 80bb8ec..0000000
--- a/messages/testsuite/Makefile.am
+++ /dev/null
@@ -1,89 +0,0 @@
-## Process this file with GNU Automake to create Makefile.in
-
-##   Copyright (C) 2002, 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 = messages
-RUNTESTFLAGS = 
-CLEANFILES = *.log
-test_dirs = messages
-
-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 ##' > 
address@hidden
-       @echo '# Do not edit here.  If you wish to override these values' >> 
address@hidden
-       @echo '# edit the last section' >> address@hidden
-       @echo 'set tool $(DEJATOOL)' >> address@hidden
-       @echo "set top_srcdir `cd $(top_srcdir); pwd`" >> address@hidden
-       @echo "set srcdir `cd $(srcdir); pwd`" >> address@hidden
-       @echo 'set objdir' `pwd` >> address@hidden
-       @echo 'set host_alias "$(host_alias)"' >> address@hidden
-       @echo 'set host_triplet $(host_triplet)' >> address@hidden
-       @echo 'set target_alias "$(target_alias)"' >> address@hidden
-       @echo 'set target_triplet $(target_triplet)' >> address@hidden
-       @echo 'set build_alias "$(build_alias)"' >> address@hidden
-       @echo 'set build_triplet $(build_triplet)' >> address@hidden
-       @echo '## All variables above are generated by configure. Do Not Edit 
##' >> address@hidden
-       @test ! -f site.exp || sed '1,/^## All variables above are.*##/ d' 
site.exp >> address@hidden
-       @test ! -f site.exp || mv site.exp site.bak
-       @mv address@hidden 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.' 
>> address@hidden
-       @echo '## Please, read file README in this directory for instructions' 
>> address@hidden
-       @echo '## on how to use this file' >> address@hidden
-       @echo "set host_board `hostname`" >> address@hidden
-       @echo 'set board_info($$host_board,connect) rlogin' >> address@hidden
-       @echo 'set board_info($$host_board,shell_prompt) "\\$$ "' >> 
address@hidden
-       @echo "set board_info(\$$host_board,top_srcdir) `cd $(top_srcdir); 
pwd`" >> address@hidden
-       @echo "set board_info(\$$host_board,srcdir) `cd $(srcdir); pwd`" >> 
address@hidden
-       @echo "set board_info(\$$host_board,objdir) `pwd`" >> address@hidden
-       @echo "set board_info(\$$host_board,top_srcdir) `cd $(top_srcdir); 
pwd`" >> address@hidden
-       @echo "set board_info(\$$host_board,top_builddir) `cd $(top_builddir); 
pwd`" >> address@hidden
-       @test ! -f remote.exp || mv remote.exp remote.bak
-       @mv address@hidden remote.exp
-
-
-DISTCLEANFILES=*.exp *.log *.sum 
-
-distclean-local:
-       -rm -rf data
diff --git a/messages/testsuite/messages/DISTFILES 
b/messages/testsuite/messages/DISTFILES
deleted file mode 100644
index adf7c09..0000000
--- a/messages/testsuite/messages/DISTFILES
+++ /dev/null
@@ -1 +0,0 @@
-test.exp
diff --git a/messages/testsuite/messages/test.exp 
b/messages/testsuite/messages/test.exp
deleted file mode 100644
index 8af2d04..0000000
--- a/messages/testsuite/messages/test.exp
+++ /dev/null
@@ -1,38 +0,0 @@
-# -*- 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 -noflags
-set env(MAIL) $MU_SPOOL_DIR/mbox1
-set env(FOLDER) $env(MAIL)
-
-mu_prepare_spools
-
-mu_exec -message "messages" \
-"Number of messages in $MU_SPOOL_DIR/mbox1: 5"
-
-mu_exec -message "messages -q" -arg -q "5"
-
-mu_exec -message "messages +teaparty.mbox" \
-     -arg "--set mailbox.folder=\"'$MU_SPOOL_DIR'\"" -arg +teaparty.mbox \
-"Number of messages in $MU_SPOOL_DIR/teaparty.mbox: 95"
-
-#end of test.exp
-       
diff --git a/readmsg/tests/Makefile.am b/readmsg/tests/Makefile.am
index 69c08a9..59dce6f 100644
--- a/readmsg/tests/Makefile.am
+++ b/readmsg/tests/Makefile.am
@@ -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],      address@hidden@])'; \
          echo 'm4_define([AT_PACKAGE_TARNAME],   address@hidden@])'; \
diff --git a/readmsg/tests/testsuite.at b/readmsg/tests/testsuite.at
index e7e63f0..beef5f9 100644
--- a/readmsg/tests/testsuite.at
+++ b/readmsg/tests/testsuite.at
@@ -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 ------------------------------------------------------------
diff --git a/sieve/tests/Makefile.am b/sieve/tests/Makefile.am
index 8a79022..a7494bc 100644
--- a/sieve/tests/Makefile.am
+++ b/sieve/tests/Makefile.am
@@ -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],      address@hidden@])'; \
          echo 'm4_define([AT_PACKAGE_TARNAME],   address@hidden@])'; \
diff --git a/sieve/tests/testsuite.at b/sieve/tests/testsuite.at
index c6d7b82..c0bb825 100644
--- a/sieve/tests/testsuite.at
+++ b/sieve/tests/testsuite.at
@@ -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
diff --git a/sieve/tests/version.at b/sieve/tests/version.at
index 5b8fc36..b4375f8 100644
--- a/sieve/tests/version.at
+++ b/sieve/tests/version.at
@@ -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)
diff --git a/testsuite/testsuite.inc b/testsuite/testsuite.inc
index 8d5b610..875f4ad 100644
--- a/testsuite/testsuite.inc
+++ b/testsuite/testsuite.inc
@@ -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])
-


hooks/post-receive
-- 
GNU Mailutils



reply via email to

[Prev in Thread] Current Thread [Next in Thread]