summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2020-08-14 21:07:37 +0300
committerSergey Poznyakoff <gray@gnu.org>2020-08-14 21:07:37 +0300
commitc37bc5dab03aaf211b9cf33edd6d566fdb6b3768 (patch)
tree169b8dedd5098572a5f1f5bb9e7a347a1839b33b
parentc00a0604d75812e026e079bc6e4ed3cba853227a (diff)
downloadmailutils-c37bc5dab03aaf211b9cf33edd6d566fdb6b3768.tar.gz
mailutils-c37bc5dab03aaf211b9cf33edd6d566fdb6b3768.tar.bz2
Reorganize testsuite.
The testsuite directory contains only data and programs that are used by other tests in the mailutils hierarchy. As such, it is moved to the top of the SUBDIRS list, so that the utilities on which another tests depend are tested first. The tests that depend on both libmailutils and libraries from libproto are moved to a separate directory libtests. These tests are run after tests in testsuite, libmailutils and libproto. * Makefile.am (SUBDIR): Move the testsuite directory before libmailutils. * configure.ac (libtests): New test directory. * libtests/.gitignore: New file. * libtests/Makefile.am: New file. * libtests/atlocal.in: New file. * testsuite/fldel.at: Move to libtests/ * testsuite/fldel.c: Likewise. * testsuite/lstuid.c: Likewise. * testsuite/lstuid00.at: Likewise. * testsuite/lstuid01.at: Likewise. * testsuite/lstuid02.at: Likewise. * testsuite/mbdel.at: Likewise. * testsuite/mbdel.c: Likewise. * testsuite/mime.at: Likewise. * testsuite/mime01.at: Likewise. * testsuite/mimetest.c: Likewise. * libtests/testsuite.at: New file. * testsuite/Makefile.am: Remove all files that depend on mailutils components. * testsuite/testsuite.at: Likewise. * testsuite/bs.c: Remove. * testsuite/msgset.c: Remove.
-rw-r--r--Makefile.am3
-rw-r--r--configure.ac2
-rw-r--r--libtests/.gitignore8
-rw-r--r--libtests/Makefile.am26
-rw-r--r--libtests/atlocal.in7
-rw-r--r--libtests/fldel.at (renamed from testsuite/fldel.at)0
-rw-r--r--libtests/fldel.c (renamed from testsuite/fldel.c)0
-rw-r--r--libtests/lstuid.c (renamed from testsuite/lstuid.c)0
-rw-r--r--libtests/lstuid00.at (renamed from testsuite/lstuid00.at)0
-rw-r--r--libtests/lstuid01.at (renamed from testsuite/lstuid01.at)0
-rw-r--r--libtests/lstuid02.at (renamed from testsuite/lstuid02.at)0
-rw-r--r--libtests/mbdel.at (renamed from testsuite/mbdel.at)0
-rw-r--r--libtests/mbdel.c (renamed from testsuite/mbdel.c)0
-rw-r--r--libtests/mime.at (renamed from testsuite/mime.at)0
-rw-r--r--libtests/mime01.at (renamed from testsuite/mime01.at)0
-rw-r--r--libtests/mimetest.c (renamed from testsuite/mimetest.c)57
-rw-r--r--libtests/testsuite.at33
-rw-r--r--testsuite/Makefile.am22
-rw-r--r--testsuite/bs.c168
-rw-r--r--testsuite/msgset.c256
-rw-r--r--testsuite/testsuite.at15
21 files changed, 106 insertions, 491 deletions
diff --git a/Makefile.am b/Makefile.am
index a842ca884..d2139e7d6 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -38,11 +38,12 @@ SUBDIRS = . \
mu-aux\
include\
po\
+ testsuite\
libmailutils\
sql\
libmu_auth\
libproto\
- testsuite\
+ libtests\
lib\
$(LIBMU_CPP_DIR)\
$(GINT_DIR)\
diff --git a/configure.ac b/configure.ac
index b58610f5a..e65fd496c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1359,6 +1359,8 @@ AC_CONFIG_FILES([include/mailutils/types.h:include/mailutils/types.hin])
AC_CONFIG_TESTDIR(testsuite)
AC_CONFIG_FILES([testsuite/Makefile testsuite/atlocal])
+AC_CONFIG_TESTDIR(libtests)
+AC_CONFIG_FILES([libtests/Makefile libtests/atlocal])
MU_CONFIG_TESTSUITE(libmailutils)
MU_CONFIG_TESTSUITE(frm)
diff --git a/libtests/.gitignore b/libtests/.gitignore
new file mode 100644
index 000000000..70c61d0b6
--- /dev/null
+++ b/libtests/.gitignore
@@ -0,0 +1,8 @@
+atconfig
+atlocal
+testsuite
+testsuite.log
+fldel
+lstuid
+mbdel
+mimetest
diff --git a/libtests/Makefile.am b/libtests/Makefile.am
new file mode 100644
index 000000000..03192e350
--- /dev/null
+++ b/libtests/Makefile.am
@@ -0,0 +1,26 @@
+include $(top_srcdir)/testsuite/testsuite.am
+AM_CPPFLAGS = $(MU_LIB_COMMON_INCLUDES)
+noinst_PROGRAMS = \
+ fldel\
+ lstuid\
+ mbdel\
+ mimetest
+
+lstuid_LDADD = $(MU_LIB_MBOX) $(MU_LIB_MAILUTILS)
+mimetest_LDADD = $(MU_LIB_MBOX) $(MU_LIB_MAILUTILS)
+mbdel_LDADD = \
+ $(MU_LIB_MAILBOX)\
+ $(MU_LIB_MAILER)\
+ $(MU_LIB_AUTH)\
+ $(MU_AUTHLIBS)\
+ $(MU_LIB_MAILUTILS)
+fldel_LDADD = $(mbdel_LDADD)
+
+TESTSUITE_AT += \
+ fldel.at\
+ lstuid00.at\
+ lstuid01.at\
+ lstuid02.at\
+ mime.at\
+ mime01.at
+
diff --git a/libtests/atlocal.in b/libtests/atlocal.in
new file mode 100644
index 000000000..937c761f0
--- /dev/null
+++ b/libtests/atlocal.in
@@ -0,0 +1,7 @@
+# @configure_input@ -*- shell-script -*-
+# Configurable variable values for Mailutils test suite.
+# Copyright (C) 2004-2020 Free Software Foundation, Inc.
+
+PATH=@abs_builddir@:$top_srcdir:$srcdir:$PATH
+@MU_COND_SUPPORT_MH_TRUE@MH_SUPPORT=yes
+@MU_COND_SUPPORT_MAILDIR_TRUE@MAILDIR_SUPPORT=yes
diff --git a/testsuite/fldel.at b/libtests/fldel.at
index 1e7a1be06..1e7a1be06 100644
--- a/testsuite/fldel.at
+++ b/libtests/fldel.at
diff --git a/testsuite/fldel.c b/libtests/fldel.c
index 0b457c59a..0b457c59a 100644
--- a/testsuite/fldel.c
+++ b/libtests/fldel.c
diff --git a/testsuite/lstuid.c b/libtests/lstuid.c
index 1249c7754..1249c7754 100644
--- a/testsuite/lstuid.c
+++ b/libtests/lstuid.c
diff --git a/testsuite/lstuid00.at b/libtests/lstuid00.at
index ce71921c3..ce71921c3 100644
--- a/testsuite/lstuid00.at
+++ b/libtests/lstuid00.at
diff --git a/testsuite/lstuid01.at b/libtests/lstuid01.at
index 7bc2bfbdd..7bc2bfbdd 100644
--- a/testsuite/lstuid01.at
+++ b/libtests/lstuid01.at
diff --git a/testsuite/lstuid02.at b/libtests/lstuid02.at
index aad18d6d0..aad18d6d0 100644
--- a/testsuite/lstuid02.at
+++ b/libtests/lstuid02.at
diff --git a/testsuite/mbdel.at b/libtests/mbdel.at
index d82eacc67..d82eacc67 100644
--- a/testsuite/mbdel.at
+++ b/libtests/mbdel.at
diff --git a/testsuite/mbdel.c b/libtests/mbdel.c
index 955c4c3b1..955c4c3b1 100644
--- a/testsuite/mbdel.c
+++ b/libtests/mbdel.c
diff --git a/testsuite/mime.at b/libtests/mime.at
index 3efee7232..3efee7232 100644
--- a/testsuite/mime.at
+++ b/libtests/mime.at
diff --git a/testsuite/mime01.at b/libtests/mime01.at
index 388e903f6..388e903f6 100644
--- a/testsuite/mime01.at
+++ b/libtests/mime01.at
diff --git a/testsuite/mimetest.c b/libtests/mimetest.c
index d5dba6f0c..d05e18927 100644
--- a/testsuite/mimetest.c
+++ b/libtests/mimetest.c
@@ -35,6 +35,7 @@ const char *subject;
const char *charset;
int print_attachments;
int indent_level = 4;
+int debug = 0;
void
print_file (const char *fname, int indent)
@@ -54,6 +55,18 @@ print_file (const char *fname, int indent)
unlink (fname);
}
+struct mu_option options[] = {
+ { "debug", 'd', NULL, MU_OPTION_DEFAULT,
+ "enable debugging", mu_c_bool, &debug },
+ { "print-attachment", 'p', NULL, MU_OPTION_DEFAULT,
+ "print attachments", mu_c_bool, &print_attachments },
+ { "indent", 'i', "N", MU_OPTION_DEFAULT,
+ "indentation level", mu_c_int, &indent_level },
+ { "charset", 'c', NULL, MU_OPTION_DEFAULT,
+ "output character set", mu_c_string, &charset },
+ MU_OPTION_END
+};
+
int
main (int argc, char **argv)
{
@@ -61,41 +74,25 @@ main (int argc, char **argv)
size_t i;
size_t count = 0;
char *mailbox_name;
- int debug = 0;
- for (i = 1; i < argc; i++)
+ mu_set_program_name (argv[0]);
+ mu_cli_simple (argc, argv,
+ MU_CLI_OPTION_OPTIONS, options,
+ MU_CLI_OPTION_PROG_DOC, "mime test tool",
+ MU_CLI_OPTION_PROG_ARGS, "MBOX",
+ MU_CLI_OPTION_RETURN_ARGC, &argc,
+ MU_CLI_OPTION_RETURN_ARGV, &argv,
+ MU_CLI_OPTION_END);
+
+ if (argc != 1)
{
- if (strcmp (argv[i], "-d") == 0)
- debug = 1;
- else if (strcmp (argv[i], "-p") == 0)
- print_attachments = 1;
- else if (strcmp (argv[i], "-i") == 0)
- {
- if (++i == argc)
- {
- mu_error ("-i requires argument");
- exit (1);
- }
- indent_level = strtoul (argv[i], NULL, 0);
- }
- else if (strcmp (argv[i], "-c") == 0)
- {
- if (++i == argc)
- {
- mu_error ("-c requires argument");
- exit (1);
- }
- charset = argv[i];
- }
- else
- break;
+ mu_error ("exactly one argument required");
+ return 2;
}
-
- mailbox_name = argv[i];
+
+ mailbox_name = argv[0];
/* Registration. */
- mu_registrar_record (mu_imap_record);
- mu_registrar_record (mu_pop_record);
mu_registrar_record (mu_mbox_record);
mu_registrar_set_default_record (mu_mbox_record);
diff --git a/libtests/testsuite.at b/libtests/testsuite.at
new file mode 100644
index 000000000..3bcc78d4d
--- /dev/null
+++ b/libtests/testsuite.at
@@ -0,0 +1,33 @@
+# This file is part of GNU Mailutils. -*- Autotest -*-
+# Copyright (C) 2010-2020 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, see <http://www.gnu.org/licenses/>.
+
+m4_include([testsuite.inc])
+
+AT_INIT
+AT_BANNER(mimetest)
+m4_include([mime.at])
+m4_include([mime01.at])
+
+AT_BANNER(UIDs)
+m4_include([lstuid00.at])
+m4_include([lstuid01.at])
+m4_include([lstuid02.at])
+
+AT_BANNER(Mailbox removal)
+m4_include([mbdel.at])
+
+AT_BANNER(Folder mailbox removal)
+m4_include([fldel.at])
diff --git a/testsuite/Makefile.am b/testsuite/Makefile.am
index c7b2457a4..6137b74c1 100644
--- a/testsuite/Makefile.am
+++ b/testsuite/Makefile.am
@@ -44,28 +44,15 @@ $(srcdir)/package.m4: $(top_srcdir)/configure.ac
noinst_DATA = package.m4
## -------------------------- ##
-## Non-installable programs
+## Non-installable programs ##
## -------------------------- ##
AM_CPPFLAGS = $(MU_LIB_COMMON_INCLUDES)
noinst_PROGRAMS = \
- bs\
cwdrepl\
- fldel\
- lstuid\
- mbdel\
- msgset\
- mimetest\
mockmail\
mockmta
-LDADD = \
- $(MU_LIB_MAILBOX)\
- $(MU_LIB_MAILER)\
- $(MU_LIB_AUTH)\
- $(MU_AUTHLIBS)\
- $(MU_LIB_MAILUTILS)
-
cwdrepl_LDADD =
mockmta_LDADD = $(TLS_LIBS)
@@ -75,13 +62,6 @@ mockmta_LDADD = $(TLS_LIBS)
TESTSUITE_AT += \
cwdrepl.at\
- fldel.at\
- lstuid00.at\
- lstuid01.at\
- lstuid02.at\
- mbdel.at\
- mime.at\
- mime01.at\
mockmail.at\
mockmta.at
diff --git a/testsuite/bs.c b/testsuite/bs.c
deleted file mode 100644
index 8e727d18a..000000000
--- a/testsuite/bs.c
+++ /dev/null
@@ -1,168 +0,0 @@
-/* GNU Mailutils -- a suite of utilities for electronic mail
- Copyright (C) 2011-2020 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, see <http://www.gnu.org/licenses/>. */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-#include <unistd.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <mailutils/mailutils.h>
-
-static void
-print_param (const char *prefix, mu_assoc_t assoc, int indent)
-{
- mu_iterator_t itr;
- int i;
-
- mu_printf ("%*s%s:\n", indent, "", prefix);
- if (!assoc)
- return;
- indent += 4;
- MU_ASSERT (mu_assoc_get_iterator (assoc, &itr));
-
- for (i = 0, mu_iterator_first (itr);
- !mu_iterator_is_done (itr);
- i++, mu_iterator_next (itr))
- {
- const char *name;
- struct mu_mime_param *p;
-
- mu_iterator_current_kv (itr, (const void **)&name, (void**)&p);
- mu_printf ("%*s%d: %s=%s\n", indent, "", i, name, p->value);
- }
- mu_iterator_destroy (&itr);
-}
-
-struct print_data
-{
- int num;
- int level;
-};
-
-static void print_bs (struct mu_bodystructure *bs, int level);
-
-static int
-print_item (void *item, void *data)
-{
- struct mu_bodystructure *bs = item;
- struct print_data *pd = data;
- mu_printf ("%*sPart #%d\n", (pd->level-1) << 2, "", pd->num);
- print_bs (bs, pd->level);
- ++pd->num;
- return 0;
-}
-
-static void
-print_address (const char *title, mu_address_t addr, int indent)
-{
- mu_printf ("%*s%s: ", indent, "", title);
- mu_stream_format_address (mu_strout, addr);
- mu_printf ("\n");
-}
-
-static void
-print_imapenvelope (struct mu_imapenvelope *env, int level)
-{
- int indent = (level << 2);
-
- mu_printf ("%*sEnvelope:\n", indent, "");
- indent += 4;
- mu_printf ("%*sTime: ", indent, "");
- mu_c_streamftime (mu_strout, "%c%n", &env->date, &env->tz);
- mu_printf ("%*sSubject: %s\n", indent, "", mu_prstr (env->subject));
- print_address ("From", env->from, indent);
- print_address ("Sender", env->sender, indent);
- print_address ("Reply-to", env->reply_to, indent);
- print_address ("To", env->to, indent);
- print_address ("Cc", env->cc, indent);
- print_address ("Bcc", env->bcc, indent);
- mu_printf ("%*sIn-Reply-To: %s\n", indent, "", mu_prstr (env->in_reply_to));
- mu_printf ("%*sMessage-ID: %s\n", indent, "", mu_prstr (env->message_id));
-}
-
-static void
-print_bs (struct mu_bodystructure *bs, int level)
-{
- int indent = level << 2;
- mu_printf ("%*sbody_type=%s\n", indent, "", mu_prstr (bs->body_type));
- mu_printf ("%*sbody_subtype=%s\n", indent, "", mu_prstr (bs->body_subtype));
- print_param ("Parameters", bs->body_param, indent);
- mu_printf ("%*sbody_id=%s\n", indent, "", mu_prstr (bs->body_id));
- mu_printf ("%*sbody_descr=%s\n", indent, "", mu_prstr (bs->body_descr));
- mu_printf ("%*sbody_encoding=%s\n", indent, "", mu_prstr (bs->body_encoding));
- mu_printf ("%*sbody_size=%lu\n", indent, "", (unsigned long) bs->body_size);
- /* Optional */
- mu_printf ("%*sbody_md5=%s\n", indent, "", mu_prstr (bs->body_md5));
- mu_printf ("%*sbody_disposition=%s\n", indent, "",
- mu_prstr (bs->body_disposition));
- print_param ("Disposition Parameters", bs->body_disp_param, indent);
- mu_printf ("%*sbody_language=%s\n", indent, "", mu_prstr (bs->body_language));
- mu_printf ("%*sbody_location=%s\n", indent, "", mu_prstr (bs->body_location));
-
- mu_printf ("%*sType ", indent, "");
- switch (bs->body_message_type)
- {
- case mu_message_other:
- mu_printf ("mu_message_other\n");
- break;
-
- case mu_message_text:
- mu_printf ("mu_message_text:\n%*sbody_lines=%lu\n", indent + 4, "",
- (unsigned long) bs->v.text.body_lines);
- break;
-
- case mu_message_rfc822:
- mu_printf ("mu_message_rfc822:\n%*sbody_lines=%lu\n", indent + 4, "",
- (unsigned long) bs->v.rfc822.body_lines);
- print_imapenvelope (bs->v.rfc822.body_env, level + 1);
- print_bs (bs->v.rfc822.body_struct, level + 1);
- break;
-
- case mu_message_multipart:
- {
- struct print_data pd;
- pd.num = 0;
- pd.level = level + 1;
- mu_printf ("mu_message_multipart:\n");
- mu_list_foreach (bs->v.multipart.body_parts, print_item, &pd);
- }
- }
-}
-
-int
-main (int argc, char **argv)
-{
- mu_mailbox_t mbox;
- mu_message_t mesg;
- struct mu_bodystructure *bs;
-
- if (argc != 3)
- {
- fprintf (stderr, "usage: %s URL NUM\n", argv[0]);
- return 1;
- }
-
- mu_register_all_mbox_formats ();
- MU_ASSERT (mu_mailbox_create (&mbox, argv[1]));
- MU_ASSERT (mu_mailbox_open (mbox, MU_STREAM_READ));
- MU_ASSERT (mu_mailbox_get_message (mbox, atoi (argv[2]), &mesg));
- MU_ASSERT (mu_message_get_bodystructure (mesg, &bs));
- print_bs (bs, 0);
- mu_bodystructure_free (bs);
-
- return 0;
-}
diff --git a/testsuite/msgset.c b/testsuite/msgset.c
deleted file mode 100644
index 679101fdd..000000000
--- a/testsuite/msgset.c
+++ /dev/null
@@ -1,256 +0,0 @@
-/* GNU Mailutils -- a suite of utilities for electronic mail
- Copyright (C) 2011-2020 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, see <http://www.gnu.org/licenses/>. */
-
-#include <config.h>
-#include <stdlib.h>
-#include <mailutils/mailutils.h>
-
-static void
-parse_msgrange (char *arg, struct mu_msgrange *range)
-{
- size_t msgnum;
- char *p;
-
- errno = 0;
- msgnum = strtoul (arg, &p, 10);
- range->msg_beg = msgnum;
- if (*p == ':')
- {
- if (*++p == '*')
- msgnum = 0;
- else
- {
- msgnum = strtoul (p, &p, 10);
- if (*p)
- {
- mu_error ("error in message range near %s", p);
- exit (1);
- }
- }
- }
- else if (*p == '*')
- msgnum = 0;
- else if (*p)
- {
- mu_error ("error in message range near %s", p);
- exit (1);
- }
-
- range->msg_end = msgnum;
-}
-
-mu_msgset_t
-parse_msgset (const char *arg, mu_mailbox_t mbox,
- int create_mode, int parse_mode)
-{
- int rc;
- mu_msgset_t msgset;
- char *end;
-
- MU_ASSERT (mu_msgset_create (&msgset, mbox, create_mode));
- if (arg)
- {
- rc = mu_msgset_parse_imap (msgset, parse_mode, arg, &end);
- if (rc)
- {
- mu_error ("mu_msgset_parse_imap: %s near %s",
- mu_strerror (rc), end);
- exit (1);
- }
- }
- return msgset;
-}
-
-int
-main (int argc, char **argv)
-{
- int i;
- char *msgset_string = NULL;
- mu_msgset_t msgset, outset;
- int create_mode = MU_MSGSET_NUM;
- int parse_mode = MU_MSGSET_NUM;
- int output_mode = MU_MSGSET_NUM;
- int output_flags = 0;
- mu_msgset_format_t format = mu_msgset_fmt_imap;
- mu_mailbox_t mbox = NULL;
-
- mu_set_program_name (argv[0]);
- mu_register_local_mbox_formats ();
- for (i = 1; i < argc; i++)
- {
- char *arg = argv[i];
-
- if (strcmp (arg, "-h") == 0 || strcmp (arg, "-help") == 0)
- {
- mu_printf ("usage: %s [-msgset[uid]=SET] [-uid] [-add[uid]=X[:Y]] [-del[uid]=X[:Y]] "
- "[-addset[uid]=SET] [-delset[uid]=SET] ...\n",
- mu_program_name);
- return 0;
- }
- else if (strncmp (arg, "-msgset=", 8) == 0)
- {
- parse_mode = MU_MSGSET_NUM;
- msgset_string = arg + 8;
- }
- else if (strncmp (arg, "-msgsetuid=", 11) == 0)
- {
- parse_mode = MU_MSGSET_UID;
- msgset_string = arg + 11;
- }
- else if (strcmp (arg, "-uid") == 0)
- create_mode = MU_MSGSET_UID;
- else if (strncmp (arg, "-mailbox=", 9) == 0)
- {
- MU_ASSERT (mu_mailbox_create (&mbox, arg + 9));
- MU_ASSERT (mu_mailbox_open (mbox, MU_STREAM_READ));
- }
- else if (strcmp (arg, "-mh") == 0)
- format = mu_msgset_fmt_mh;
- else if (strcmp (arg, "-printuid") == 0)
- output_mode = MU_MSGSET_UID;
- else if (strcmp (arg, "-printnum") == 0)
- output_mode = MU_MSGSET_NUM;
- else if (strcmp (arg, "-ignore-error") == 0)
- output_flags = MU_MSGSET_IGNORE_TRANSERR;
- else
- break;
- }
-
- msgset = parse_msgset (msgset_string, mbox, create_mode, parse_mode);
-
- for (; i < argc; i++)
- {
- char *arg = argv[i];
- struct mu_msgrange range;
-
- if (strncmp (arg, "-add=", 5) == 0)
- {
- parse_msgrange (arg + 5, &range);
- MU_ASSERT (mu_msgset_add_range (msgset,
- range.msg_beg, range.msg_end,
- MU_MSGSET_NUM));
- }
- else if (strncmp (arg, "-sub=", 5) == 0)
- {
- parse_msgrange (arg + 5, &range);
- MU_ASSERT (mu_msgset_sub_range (msgset,
- range.msg_beg, range.msg_end,
- MU_MSGSET_NUM));
- }
- else if (strncmp (arg, "-adduid=", 8) == 0)
- {
- parse_msgrange (arg + 8, &range);
- MU_ASSERT (mu_msgset_add_range (msgset,
- range.msg_beg, range.msg_end,
- MU_MSGSET_UID));
- }
- else if (strncmp (arg, "-subuid=", 8) == 0)
- {
- parse_msgrange (arg + 8, &range);
- MU_ASSERT (mu_msgset_sub_range (msgset,
- range.msg_beg, range.msg_end,
- MU_MSGSET_UID));
- }
- else if (strncmp (arg, "-addset", 7) == 0)
- {
- mu_msgset_t tset;
- int m;
-
- arg += 7;
- if (strncmp (arg, "uid", 3) == 0)
- {
- m = MU_MSGSET_UID;
- arg += 3;
- }
- else
- m = MU_MSGSET_NUM;
- if (*arg == '=')
- arg++;
- else
- {
- mu_error ("unknown option %s", argv[i]);
- return 1;
- }
-
- tset = parse_msgset (arg, mbox, m, m);
- if (!msgset)
- msgset = tset;
- else
- {
- MU_ASSERT (mu_msgset_add (msgset, tset));
- mu_msgset_free (tset);
- }
- }
- else if (strncmp (arg, "-subset=", 8) == 0)
- {
- mu_msgset_t tset;
- int m;
-
- arg += 7;
- if (strncmp (arg, "uid", 3) == 0)
- {
- m = MU_MSGSET_UID;
- arg += 3;
- }
- else
- m = MU_MSGSET_NUM;
- if (*arg == '=')
- arg++;
- else
- {
- mu_error ("unknown option %s", argv[i]);
- return 1;
- }
-
- tset = parse_msgset (arg, mbox, m, m);
-
- if (!msgset)
- {
- mu_error ("no initial message set");
- exit (1);
- }
- else
- {
- MU_ASSERT (mu_msgset_sub (msgset, tset));
- mu_msgset_free (tset);
- }
- }
- else if (strcmp (arg, "-neg") == 0)
- {
- mu_msgset_t negated_set;
- MU_ASSERT (mu_msgset_negate (msgset, &negated_set));
- mu_msgset_free (msgset);
- msgset = negated_set;
- }
- else
- {
- mu_error ("unknown option %s", arg);
- return 1;
- }
- }
-
- MU_ASSERT (mu_msgset_translate (&outset, msgset, output_mode|output_flags));
- MU_ASSERT (mu_stream_msgset_format (mu_strout, format, outset));
- mu_printf ("\n");
- mu_msgset_free (outset);
- mu_msgset_free (msgset);
-
- return 0;
-}
-
-
-
-
diff --git a/testsuite/testsuite.at b/testsuite/testsuite.at
index ffbdcac30..90b5a4207 100644
--- a/testsuite/testsuite.at
+++ b/testsuite/testsuite.at
@@ -23,18 +23,3 @@ m4_include([cwdrepl.at])
m4_include([mockmail.at])
m4_include([mockmta.at])
-AT_BANNER(UIDs)
-m4_include([lstuid00.at])
-m4_include([lstuid01.at])
-m4_include([lstuid02.at])
-
-AT_BANNER(mimetest)
-m4_include([mime.at])
-m4_include([mime01.at])
-
-AT_BANNER(Mailbox removal)
-m4_include([mbdel.at])
-
-AT_BANNER(Folder mailbox removal)
-m4_include([fldel.at])
-

Return to:

Send suggestions and report system problems to the System administrator.