From 80c5e25b08bd4acefed08634145e64e147195d3c Mon Sep 17 00:00:00 2001 From: "Dirk-Jan C. Binnema" Date: Wed, 1 Jan 2020 15:41:49 +0200 Subject: [PATCH] mu: move mu/mu/tests, lib/tests one level up Makes it easier to generator code-coverage reports --- lib/Makefile.am | 324 +++++++++++---- lib/{tests => }/test-mu-common.c | 0 lib/{tests => }/test-mu-common.h | 0 lib/{tests => }/test-mu-contacts.cc | 0 lib/{tests => }/test-mu-container.c | 0 lib/{tests => }/test-mu-date.c | 0 lib/{tests => }/test-mu-flags.c | 0 lib/{tests => }/test-mu-maildir.c | 0 lib/{tests => }/test-mu-msg-fields.c | 0 lib/{tests => }/test-mu-msg.c | 0 lib/{tests => }/test-mu-store.c | 0 .../cur/1220863042.12663_1.mindcrime!2,S | 0 .../cur/1220863060.12663_3.mindcrime!2,S | 0 .../cur/1220863087.12663_15.mindcrime!2,PS | 0 .../cur/1220863087.12663_19.mindcrime!2,S | 0 .../cur/1220863087.12663_5.mindcrime!2,S | 0 .../cur/1220863087.12663_7.mindcrime!2,RS | 0 .../cur/1252168370_3.14675.cthulhu!2,S | 0 .../testdir/cur/1283599333.1840_11.cthulhu!2, | 0 .../cur/1305664394.2171_402.cthulhu!2, | 0 lib/{tests => }/testdir/cur/encrypted!2,S | 0 lib/{tests => }/testdir/cur/multimime!2,FS | 0 lib/{tests => }/testdir/cur/multirecip!2,S | 0 lib/{tests => }/testdir/cur/signed!2,S | 0 .../testdir/cur/signed-encrypted!2,S | 0 lib/{tests => }/testdir/cur/special!2,Sabc | 0 .../testdir/new/1220863087.12663_21.mindcrime | 0 .../testdir/new/1220863087.12663_23.mindcrime | 0 .../testdir/new/1220863087.12663_25.mindcrime | 0 .../testdir/new/1220863087.12663_9.mindcrime | 0 .../testdir/tmp/1220863087.12663.ignore | 0 lib/{tests => }/testdir2/Foo/cur/arto.eml | 0 lib/{tests => }/testdir2/Foo/cur/fraiche.eml | 0 lib/{tests => }/testdir2/Foo/cur/mail5 | 0 lib/{tests => }/testdir2/Foo/new/.noindex | 0 lib/{tests => }/testdir2/Foo/tmp/.noindex | 0 lib/{tests => }/testdir2/bar/cur/181736.eml | 0 lib/{tests => }/testdir2/bar/cur/mail1 | 0 lib/{tests => }/testdir2/bar/cur/mail2 | 0 lib/{tests => }/testdir2/bar/cur/mail3 | 0 lib/{tests => }/testdir2/bar/cur/mail4 | 0 lib/{tests => }/testdir2/bar/cur/mail5 | 0 lib/{tests => }/testdir2/bar/cur/mail6 | 0 lib/{tests => }/testdir2/bar/new/.noindex | 0 lib/{tests => }/testdir2/bar/tmp/.noindex | 0 lib/{tests => }/testdir2/wom_bat/cur/atomic | 0 lib/{tests => }/testdir2/wom_bat/cur/rfc822.1 | 0 lib/{tests => }/testdir2/wom_bat/cur/rfc822.2 | 0 lib/{tests => }/testdir3/cycle/cur/cycle0 | 0 lib/{tests => }/testdir3/cycle/cur/cycle0.0 | 0 lib/{tests => }/testdir3/cycle/cur/cycle0.0.0 | 0 lib/{tests => }/testdir3/cycle/cur/rogue0 | 0 lib/{tests => }/testdir3/cycle/new/.noindex | 0 lib/{tests => }/testdir3/cycle/tmp/.noindex | 0 .../sort/1st-child-promotes-thread/cur/A | 0 .../sort/1st-child-promotes-thread/cur/B | 0 .../sort/1st-child-promotes-thread/cur/C | 0 .../sort/1st-child-promotes-thread/cur/D | 0 .../1st-child-promotes-thread/new/.noindex | 0 .../1st-child-promotes-thread/tmp/.noindex | 0 .../sort/2nd-child-promotes-thread/cur/A | 0 .../sort/2nd-child-promotes-thread/cur/B | 0 .../sort/2nd-child-promotes-thread/cur/C | 0 .../sort/2nd-child-promotes-thread/cur/D | 0 .../sort/2nd-child-promotes-thread/cur/E | 0 .../2nd-child-promotes-thread/new/.noindex | 0 .../2nd-child-promotes-thread/tmp/.noindex | 0 .../sort/child-does-not-promote-thread/cur/A | 0 .../sort/child-does-not-promote-thread/cur/X | 0 .../sort/child-does-not-promote-thread/cur/Y | 0 .../sort/child-does-not-promote-thread/cur/Z | 0 .../new/.noindex | 0 .../tmp/.noindex | 0 .../grandchild-promotes-only-subthread/cur/A | 0 .../grandchild-promotes-only-subthread/cur/B | 0 .../grandchild-promotes-only-subthread/cur/C | 0 .../grandchild-promotes-only-subthread/cur/D | 0 .../grandchild-promotes-only-subthread/cur/E | 0 .../grandchild-promotes-only-subthread/cur/F | 0 .../grandchild-promotes-only-subthread/cur/G | 0 .../new/.noindex | 0 .../tmp/.noindex | 0 .../sort/grandchild-promotes-thread/cur/A | 0 .../sort/grandchild-promotes-thread/cur/B | 0 .../sort/grandchild-promotes-thread/cur/C | 0 .../sort/grandchild-promotes-thread/cur/D | 0 .../sort/grandchild-promotes-thread/cur/E | 0 .../grandchild-promotes-thread/new/.noindex | 0 .../grandchild-promotes-thread/tmp/.noindex | 0 lib/{tests => }/testdir3/tree/cur/child0.0 | 0 lib/{tests => }/testdir3/tree/cur/child0.1 | 0 lib/{tests => }/testdir3/tree/cur/child0.1.0 | 0 lib/{tests => }/testdir3/tree/cur/child2.0.0 | 0 .../testdir3/tree/cur/child3.0.0.0.0 | 0 lib/{tests => }/testdir3/tree/cur/child4.0 | 0 lib/{tests => }/testdir3/tree/cur/child4.1 | 0 lib/{tests => }/testdir3/tree/cur/root0 | 0 lib/{tests => }/testdir3/tree/cur/root1 | 0 lib/{tests => }/testdir3/tree/cur/root2 | 0 lib/{tests => }/testdir3/tree/new/.noindex | 0 lib/{tests => }/testdir3/tree/tmp/.noindex | 0 .../testdir4/1220863042.12663_1.mindcrime!2,S | 0 .../1220863087.12663_19.mindcrime!2,S | 0 .../testdir4/1252168370_3.14675.cthulhu!2,S | 0 .../testdir4/1283599333.1840_11.cthulhu!2, | 0 .../testdir4/1305664394.2171_402.cthulhu!2, | 0 lib/{tests => }/testdir4/181736.eml | 0 lib/{tests => }/testdir4/encrypted!2,S | 0 lib/{tests => }/testdir4/mail1 | 0 lib/{tests => }/testdir4/mail5 | 0 lib/{tests => }/testdir4/multimime!2,FS | 0 lib/{tests => }/testdir4/signed!2,S | 0 lib/{tests => }/testdir4/signed-bad!2,S | 0 lib/{tests => }/testdir4/signed-encrypted!2,S | 0 lib/{tests => }/testdir4/special!2,Sabc | 0 lib/tests/Makefile.am | 191 --------- lib/tests/dummy.cc | 0 man/mu-mfind.1 | 390 ------------------ mu/Makefile.am | 112 +++-- mu/{tests => }/test-mu-cmd-cfind.c | 7 +- mu/{tests => }/test-mu-cmd.c | 0 mu/{tests => }/test-mu-query.c | 0 mu/{tests => }/test-mu-runtime.c | 0 mu/{tests => }/test-mu-threads.c | 0 mu/tests/Makefile.am | 69 ---- 125 files changed, 325 insertions(+), 768 deletions(-) rename lib/{tests => }/test-mu-common.c (100%) rename lib/{tests => }/test-mu-common.h (100%) rename lib/{tests => }/test-mu-contacts.cc (100%) rename lib/{tests => }/test-mu-container.c (100%) rename lib/{tests => }/test-mu-date.c (100%) rename lib/{tests => }/test-mu-flags.c (100%) rename lib/{tests => }/test-mu-maildir.c (100%) rename lib/{tests => }/test-mu-msg-fields.c (100%) rename lib/{tests => }/test-mu-msg.c (100%) rename lib/{tests => }/test-mu-store.c (100%) rename lib/{tests => }/testdir/cur/1220863042.12663_1.mindcrime!2,S (100%) rename lib/{tests => }/testdir/cur/1220863060.12663_3.mindcrime!2,S (100%) rename lib/{tests => }/testdir/cur/1220863087.12663_15.mindcrime!2,PS (100%) rename lib/{tests => }/testdir/cur/1220863087.12663_19.mindcrime!2,S (100%) rename lib/{tests => }/testdir/cur/1220863087.12663_5.mindcrime!2,S (100%) rename lib/{tests => }/testdir/cur/1220863087.12663_7.mindcrime!2,RS (100%) rename lib/{tests => }/testdir/cur/1252168370_3.14675.cthulhu!2,S (100%) rename lib/{tests => }/testdir/cur/1283599333.1840_11.cthulhu!2, (100%) rename lib/{tests => }/testdir/cur/1305664394.2171_402.cthulhu!2, (100%) rename lib/{tests => }/testdir/cur/encrypted!2,S (100%) rename lib/{tests => }/testdir/cur/multimime!2,FS (100%) rename lib/{tests => }/testdir/cur/multirecip!2,S (100%) rename lib/{tests => }/testdir/cur/signed!2,S (100%) rename lib/{tests => }/testdir/cur/signed-encrypted!2,S (100%) rename lib/{tests => }/testdir/cur/special!2,Sabc (100%) rename lib/{tests => }/testdir/new/1220863087.12663_21.mindcrime (100%) rename lib/{tests => }/testdir/new/1220863087.12663_23.mindcrime (100%) rename lib/{tests => }/testdir/new/1220863087.12663_25.mindcrime (100%) rename lib/{tests => }/testdir/new/1220863087.12663_9.mindcrime (100%) rename lib/{tests => }/testdir/tmp/1220863087.12663.ignore (100%) rename lib/{tests => }/testdir2/Foo/cur/arto.eml (100%) rename lib/{tests => }/testdir2/Foo/cur/fraiche.eml (100%) rename lib/{tests => }/testdir2/Foo/cur/mail5 (100%) rename lib/{tests => }/testdir2/Foo/new/.noindex (100%) rename lib/{tests => }/testdir2/Foo/tmp/.noindex (100%) rename lib/{tests => }/testdir2/bar/cur/181736.eml (100%) rename lib/{tests => }/testdir2/bar/cur/mail1 (100%) rename lib/{tests => }/testdir2/bar/cur/mail2 (100%) rename lib/{tests => }/testdir2/bar/cur/mail3 (100%) rename lib/{tests => }/testdir2/bar/cur/mail4 (100%) rename lib/{tests => }/testdir2/bar/cur/mail5 (100%) rename lib/{tests => }/testdir2/bar/cur/mail6 (100%) rename lib/{tests => }/testdir2/bar/new/.noindex (100%) rename lib/{tests => }/testdir2/bar/tmp/.noindex (100%) rename lib/{tests => }/testdir2/wom_bat/cur/atomic (100%) rename lib/{tests => }/testdir2/wom_bat/cur/rfc822.1 (100%) rename lib/{tests => }/testdir2/wom_bat/cur/rfc822.2 (100%) rename lib/{tests => }/testdir3/cycle/cur/cycle0 (100%) rename lib/{tests => }/testdir3/cycle/cur/cycle0.0 (100%) rename lib/{tests => }/testdir3/cycle/cur/cycle0.0.0 (100%) rename lib/{tests => }/testdir3/cycle/cur/rogue0 (100%) rename lib/{tests => }/testdir3/cycle/new/.noindex (100%) rename lib/{tests => }/testdir3/cycle/tmp/.noindex (100%) rename lib/{tests => }/testdir3/sort/1st-child-promotes-thread/cur/A (100%) rename lib/{tests => }/testdir3/sort/1st-child-promotes-thread/cur/B (100%) rename lib/{tests => }/testdir3/sort/1st-child-promotes-thread/cur/C (100%) rename lib/{tests => }/testdir3/sort/1st-child-promotes-thread/cur/D (100%) rename lib/{tests => }/testdir3/sort/1st-child-promotes-thread/new/.noindex (100%) rename lib/{tests => }/testdir3/sort/1st-child-promotes-thread/tmp/.noindex (100%) rename lib/{tests => }/testdir3/sort/2nd-child-promotes-thread/cur/A (100%) rename lib/{tests => }/testdir3/sort/2nd-child-promotes-thread/cur/B (100%) rename lib/{tests => }/testdir3/sort/2nd-child-promotes-thread/cur/C (100%) rename lib/{tests => }/testdir3/sort/2nd-child-promotes-thread/cur/D (100%) rename lib/{tests => }/testdir3/sort/2nd-child-promotes-thread/cur/E (100%) rename lib/{tests => }/testdir3/sort/2nd-child-promotes-thread/new/.noindex (100%) rename lib/{tests => }/testdir3/sort/2nd-child-promotes-thread/tmp/.noindex (100%) rename lib/{tests => }/testdir3/sort/child-does-not-promote-thread/cur/A (100%) rename lib/{tests => }/testdir3/sort/child-does-not-promote-thread/cur/X (100%) rename lib/{tests => }/testdir3/sort/child-does-not-promote-thread/cur/Y (100%) rename lib/{tests => }/testdir3/sort/child-does-not-promote-thread/cur/Z (100%) rename lib/{tests => }/testdir3/sort/child-does-not-promote-thread/new/.noindex (100%) rename lib/{tests => }/testdir3/sort/child-does-not-promote-thread/tmp/.noindex (100%) rename lib/{tests => }/testdir3/sort/grandchild-promotes-only-subthread/cur/A (100%) rename lib/{tests => }/testdir3/sort/grandchild-promotes-only-subthread/cur/B (100%) rename lib/{tests => }/testdir3/sort/grandchild-promotes-only-subthread/cur/C (100%) rename lib/{tests => }/testdir3/sort/grandchild-promotes-only-subthread/cur/D (100%) rename lib/{tests => }/testdir3/sort/grandchild-promotes-only-subthread/cur/E (100%) rename lib/{tests => }/testdir3/sort/grandchild-promotes-only-subthread/cur/F (100%) rename lib/{tests => }/testdir3/sort/grandchild-promotes-only-subthread/cur/G (100%) rename lib/{tests => }/testdir3/sort/grandchild-promotes-only-subthread/new/.noindex (100%) rename lib/{tests => }/testdir3/sort/grandchild-promotes-only-subthread/tmp/.noindex (100%) rename lib/{tests => }/testdir3/sort/grandchild-promotes-thread/cur/A (100%) rename lib/{tests => }/testdir3/sort/grandchild-promotes-thread/cur/B (100%) rename lib/{tests => }/testdir3/sort/grandchild-promotes-thread/cur/C (100%) rename lib/{tests => }/testdir3/sort/grandchild-promotes-thread/cur/D (100%) rename lib/{tests => }/testdir3/sort/grandchild-promotes-thread/cur/E (100%) rename lib/{tests => }/testdir3/sort/grandchild-promotes-thread/new/.noindex (100%) rename lib/{tests => }/testdir3/sort/grandchild-promotes-thread/tmp/.noindex (100%) rename lib/{tests => }/testdir3/tree/cur/child0.0 (100%) rename lib/{tests => }/testdir3/tree/cur/child0.1 (100%) rename lib/{tests => }/testdir3/tree/cur/child0.1.0 (100%) rename lib/{tests => }/testdir3/tree/cur/child2.0.0 (100%) rename lib/{tests => }/testdir3/tree/cur/child3.0.0.0.0 (100%) rename lib/{tests => }/testdir3/tree/cur/child4.0 (100%) rename lib/{tests => }/testdir3/tree/cur/child4.1 (100%) rename lib/{tests => }/testdir3/tree/cur/root0 (100%) rename lib/{tests => }/testdir3/tree/cur/root1 (100%) rename lib/{tests => }/testdir3/tree/cur/root2 (100%) rename lib/{tests => }/testdir3/tree/new/.noindex (100%) rename lib/{tests => }/testdir3/tree/tmp/.noindex (100%) rename lib/{tests => }/testdir4/1220863042.12663_1.mindcrime!2,S (100%) rename lib/{tests => }/testdir4/1220863087.12663_19.mindcrime!2,S (100%) rename lib/{tests => }/testdir4/1252168370_3.14675.cthulhu!2,S (100%) rename lib/{tests => }/testdir4/1283599333.1840_11.cthulhu!2, (100%) rename lib/{tests => }/testdir4/1305664394.2171_402.cthulhu!2, (100%) rename lib/{tests => }/testdir4/181736.eml (100%) rename lib/{tests => }/testdir4/encrypted!2,S (100%) rename lib/{tests => }/testdir4/mail1 (100%) rename lib/{tests => }/testdir4/mail5 (100%) rename lib/{tests => }/testdir4/multimime!2,FS (100%) rename lib/{tests => }/testdir4/signed!2,S (100%) rename lib/{tests => }/testdir4/signed-bad!2,S (100%) rename lib/{tests => }/testdir4/signed-encrypted!2,S (100%) rename lib/{tests => }/testdir4/special!2,Sabc (100%) delete mode 100644 lib/tests/Makefile.am delete mode 100644 lib/tests/dummy.cc delete mode 100644 man/mu-mfind.1 rename mu/{tests => }/test-mu-cmd-cfind.c (98%) rename mu/{tests => }/test-mu-cmd.c (100%) rename mu/{tests => }/test-mu-query.c (100%) rename mu/{tests => }/test-mu-runtime.c (100%) rename mu/{tests => }/test-mu-threads.c (100%) delete mode 100644 mu/tests/Makefile.am diff --git a/lib/Makefile.am b/lib/Makefile.am index a1aee16a..6b9c7525 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -1,4 +1,4 @@ -## Copyright (C) 2010-2017 Dirk-Jan C. Binnema +## Copyright (C) 2010-2020 Dirk-Jan C. Binnema ## ## 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 @@ -14,106 +14,272 @@ ## along with this program; if not, write to the Free Software Foundation, ## Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -include $(top_srcdir)/gtest.mk - # enforce compiling guile (optionally) first,then this dir first # before decending into tests/ -SUBDIRS= utils parser . tests +include $(top_srcdir)/gtest.mk + +SUBDIRS= utils parser if HAVE_JSON_GLIB -json_srcs= \ - mu-msg-json.c \ +json_srcs= \ + mu-msg-json.c \ mu-msg-json.h json_flag="-DHAVE_JSON_GLIB" endif -AM_CFLAGS= \ - $(WARN_CFLAGS) \ - $(GMIME_CFLAGS) \ - $(GLIB_CFLAGS) \ - $(GUILE_CFLAGS) \ - $(JSON_GLIB_CFLAGS) \ - $(ASAN_CFLAGS) \ - $(json_flag) \ - -Wno-format-nonliteral \ - -Wno-switch-enum \ - -Wno-deprecated-declarations \ +AM_CFLAGS= \ + $(WARN_CFLAGS) \ + $(GMIME_CFLAGS) \ + $(GLIB_CFLAGS) \ + $(GUILE_CFLAGS) \ + $(JSON_GLIB_CFLAGS) \ + $(ASAN_CFLAGS) \ + $(json_flag) \ + $(CODE_COVERAGE_CFLAGS) \ + -DMU_TESTMAILDIR=\"${abs_srcdir}/testdir\" \ + -DMU_TESTMAILDIR2=\"${abs_srcdir}/testdir2\" \ + -DMU_TESTMAILDIR3=\"${abs_srcdir}/testdir3\" \ + -DMU_TESTMAILDIR4=\"${abs_srcdir}/testdir4\" \ + -DABS_CURDIR=\"${abs_builddir}\" \ + -DABS_SRCDIR=\"${abs_srcdir}\" + -Wno-format-nonliteral \ + -Wno-switch-enum \ + -Wno-deprecated-declarations \ -Wno-inline -AM_CXXFLAGS= \ - $(WARN_CXXFLAGS) \ - $(GMIME_CFLAGS) \ - $(GLIB_CFLAGS) \ - $(JSON_GLIB_CFLAGS) \ - $(XAPIAN_CXXFLAGS) \ - $(GUILE_CFLAGS) \ - $(ASAN_CXXFLAGS) +AM_CXXFLAGS= \ + $(GMIME_CFLAGS) \ + $(GLIB_CFLAGS) \ + $(GUILE_CFLAGS) \ + $(JSON_GLIB_CFLAGS) \ + $(json_flag) \ + $(WARN_CXXFLAGS) \ + $(XAPIAN_CXXFLAGS) \ + $(ASAN_CXXFLAGS) \ + $(CODE_COVERAGE_CFLAGS) + +AM_CPPFLAGS= \ + $(CODE_COVERAGE_CPPFLAGS) # don't use -Werror, as it might break on other compilers # use -Wno-unused-parameters, because some callbacks may not # really need all the params they get -# AM_CFLAGS=-Wall -Wextra -Wno-unused-parameter \ +# AM_CFLAGS=-Wall -Wextra -Wno-unused-parameter \ # -Wdeclaration-after-statement -Wno-variadic-macros # AM_CXXFLAGS=-Wall -Wextra -Wno-unused-parameter -noinst_LTLIBRARIES= \ +noinst_LTLIBRARIES= \ libmu.la -libmu_la_SOURCES= \ - mu-bookmarks.c \ - mu-bookmarks.h \ - mu-contacts.cc \ - mu-contacts.hh \ - mu-container.c \ - mu-container.h \ - mu-flags.h \ - mu-flags.c \ - mu-index.c \ - mu-index.h \ - mu-maildir.c \ - mu-maildir.h \ - mu-msg-crypto.c \ - mu-msg-doc.cc \ - mu-msg-doc.h \ - mu-msg-fields.c \ - mu-msg-fields.h \ - mu-msg-file.c \ - mu-msg-file.h \ - mu-msg-iter.cc \ - mu-msg-iter.h \ - $(json_srcs) \ - mu-msg-part.c \ - mu-msg-part.h \ - mu-msg-prio.c \ - mu-msg-prio.h \ - mu-msg-priv.h \ - mu-msg-sexp.c \ - mu-msg.c \ - mu-msg.h \ - mu-msg.h \ - mu-query.cc \ - mu-query.h \ - mu-runtime.cc \ - mu-runtime.h \ - mu-script.c \ - mu-script.h \ - mu-store.cc \ - mu-store.hh \ - mu-threader.c \ +libmu_la_SOURCES= \ + mu-bookmarks.c \ + mu-bookmarks.h \ + mu-contacts.cc \ + mu-contacts.hh \ + mu-container.c \ + mu-container.h \ + mu-flags.h \ + mu-flags.c \ + mu-index.c \ + mu-index.h \ + mu-maildir.c \ + mu-maildir.h \ + mu-msg-crypto.c \ + mu-msg-doc.cc \ + mu-msg-doc.h \ + mu-msg-fields.c \ + mu-msg-fields.h \ + mu-msg-file.c \ + mu-msg-file.h \ + mu-msg-iter.cc \ + mu-msg-iter.h \ + $(json_srcs) \ + mu-msg-part.c \ + mu-msg-part.h \ + mu-msg-prio.c \ + mu-msg-prio.h \ + mu-msg-priv.h \ + mu-msg-sexp.c \ + mu-msg.c \ + mu-msg.h \ + mu-msg.h \ + mu-query.cc \ + mu-query.h \ + mu-runtime.cc \ + mu-runtime.h \ + mu-script.c \ + mu-script.h \ + mu-store.cc \ + mu-store.hh \ + mu-threader.c \ mu-threader.h -libmu_la_LIBADD= \ - $(XAPIAN_LIBS) \ - $(GMIME_LIBS) \ - $(GLIB_LIBS) \ - $(GUILE_LIBS) \ - $(JSON_GLIB_LIBS) \ - ${builddir}/utils/libmu-utils.la \ - ${builddir}/parser/libmu-parser.la +libmu_la_LIBADD= \ + $(XAPIAN_LIBS) \ + $(GMIME_LIBS) \ + $(GLIB_LIBS) \ + $(GUILE_LIBS) \ + $(JSON_GLIB_LIBS) \ + ${builddir}/utils/libmu-utils.la \ + ${builddir}/parser/libmu-parser.la \ + $(CODE_COVERAGE_LIBS) -libmu_la_LDFLAGS= \ +libmu_la_LDFLAGS= \ $(ASAN_LDFLAGS) -EXTRA_DIST= \ - mu-msg-crypto.c \ +EXTRA_DIST= \ + mu-msg-crypto.c \ doxyfile.in + +noinst_PROGRAMS= $(TEST_PROGS) + +noinst_LTLIBRARIES+= \ + libtestmucommon.la + +TEST_PROGS += test-mu-maildir +test_mu_maildir_SOURCES= test-mu-maildir.c dummy.cc +test_mu_maildir_LDADD= libtestmucommon.la + +TEST_PROGS += test-mu-msg-fields +test_mu_msg_fields_SOURCES= test-mu-msg-fields.c dummy.cc +test_mu_msg_fields_LDADD= libtestmucommon.la + +TEST_PROGS += test-mu-msg +test_mu_msg_SOURCES= test-mu-msg.c dummy.cc +test_mu_msg_LDADD= libtestmucommon.la + +TEST_PROGS += test-mu-store +test_mu_store_SOURCES= test-mu-store.c dummy.cc +test_mu_store_LDADD= libtestmucommon.la + +TEST_PROGS += test-mu-flags +test_mu_flags_SOURCES= test-mu-flags.c dummy.cc +test_mu_flags_LDADD= libtestmucommon.la + +TEST_PROGS += test-mu-container +test_mu_container_SOURCES= test-mu-container.c dummy.cc +test_mu_container_LDADD= libtestmucommon.la + +TEST_PROGS += test-mu-contacts +test_mu_contacts_SOURCES= test-mu-contacts.cc +test_mu_contacts_LDADD= libtestmucommon.la + +# we need to use dummy.cc to enforce c++ linking... +BUILT_SOURCES= \ + dummy.cc + +dummy.cc: + touch dummy.cc + +libtestmucommon_la_SOURCES= \ + test-mu-common.c \ + test-mu-common.h +libtestmucommon_la_LIBADD= \ + libmu.la + +# note the question marks; make does not like files with ':', so we +# use the (also supported) version with '!' instead. We could escape +# the : with \: but automake does not recognize that.... + +# test messages, the '.ignore' message should be ignored +# when indexing +EXTRA_DIST+= \ + testdir/tmp/1220863087.12663.ignore \ + testdir/new/1220863087.12663_9.mindcrime \ + testdir/new/1220863087.12663_25.mindcrime \ + testdir/new/1220863087.12663_21.mindcrime \ + testdir/new/1220863087.12663_23.mindcrime \ + testdir/cur/1220863087.12663_5.mindcrime!2,S \ + testdir/cur/1220863087.12663_7.mindcrime!2,RS \ + testdir/cur/1220863087.12663_15.mindcrime!2,PS \ + testdir/cur/1220863087.12663_19.mindcrime!2,S \ + testdir/cur/1220863042.12663_1.mindcrime!2,S \ + testdir/cur/1220863060.12663_3.mindcrime!2,S \ + testdir/cur/1283599333.1840_11.cthulhu!2, \ + testdir/cur/1305664394.2171_402.cthulhu!2, \ + testdir/cur/1252168370_3.14675.cthulhu!2,S \ + testdir/cur/encrypted!2,S \ + testdir/cur/multimime!2,FS \ + testdir/cur/signed!2,S \ + testdir/cur/signed-encrypted!2,S \ + testdir/cur/special!2,Sabc \ + testdir/cur/multirecip!2,S \ + testdir2/bar/cur/mail1 \ + testdir2/bar/cur/mail2 \ + testdir2/bar/cur/mail3 \ + testdir2/bar/cur/mail4 \ + testdir2/bar/cur/mail5 \ + testdir2/bar/cur/181736.eml \ + testdir2/bar/cur/mail6 \ + testdir2/bar/tmp/.noindex \ + testdir2/bar/new/.noindex \ + testdir2/Foo/cur/mail5 \ + testdir2/Foo/cur/arto.eml \ + testdir2/Foo/cur/fraiche.eml \ + testdir2/Foo/tmp/.noindex \ + testdir2/Foo/new/.noindex \ + testdir2/wom_bat/cur/atomic \ + testdir2/wom_bat/cur/rfc822.1 \ + testdir2/wom_bat/cur/rfc822.2 \ + testdir3/cycle \ + testdir3/cycle/new/.noindex \ + testdir3/cycle/cur/rogue0 \ + testdir3/cycle/cur/cycle0 \ + testdir3/cycle/cur/cycle0.0 \ + testdir3/cycle/cur/cycle0.0.0 \ + testdir3/cycle/tmp/.noindex \ + testdir3/tree/new/.noindex \ + testdir3/tree/cur/child0.0 \ + testdir3/tree/cur/child4.0 \ + testdir3/tree/cur/root2 \ + testdir3/tree/cur/root1 \ + testdir3/tree/cur/child3.0.0.0.0 \ + testdir3/tree/cur/root0 \ + testdir3/tree/cur/child2.0.0 \ + testdir3/tree/cur/child0.1 \ + testdir3/tree/cur/child0.1.0 \ + testdir3/tree/cur/child4.1 \ + testdir3/tree/tmp/.noindex \ + testdir3/sort/1st-child-promotes-thread/cur/A \ + testdir3/sort/1st-child-promotes-thread/cur/B \ + testdir3/sort/1st-child-promotes-thread/cur/C \ + testdir3/sort/1st-child-promotes-thread/cur/D \ + testdir3/sort/2nd-child-promotes-thread/cur/A \ + testdir3/sort/2nd-child-promotes-thread/cur/B \ + testdir3/sort/2nd-child-promotes-thread/cur/C \ + testdir3/sort/2nd-child-promotes-thread/cur/D \ + testdir3/sort/2nd-child-promotes-thread/cur/E \ + testdir3/sort/child-does-not-promote-thread/cur/A \ + testdir3/sort/child-does-not-promote-thread/cur/X \ + testdir3/sort/child-does-not-promote-thread/cur/Y \ + testdir3/sort/child-does-not-promote-thread/cur/Z \ + testdir3/sort/grandchild-promotes-only-subthread/cur/A \ + testdir3/sort/grandchild-promotes-only-subthread/cur/B \ + testdir3/sort/grandchild-promotes-only-subthread/cur/C \ + testdir3/sort/grandchild-promotes-only-subthread/cur/D \ + testdir3/sort/grandchild-promotes-only-subthread/cur/E \ + testdir3/sort/grandchild-promotes-only-subthread/cur/F \ + testdir3/sort/grandchild-promotes-only-subthread/cur/G \ + testdir3/sort/grandchild-promotes-thread/cur/A \ + testdir3/sort/grandchild-promotes-thread/cur/B \ + testdir3/sort/grandchild-promotes-thread/cur/C \ + testdir3/sort/grandchild-promotes-thread/cur/D \ + testdir3/sort/grandchild-promotes-thread/cur/E \ + testdir4/1220863087.12663_19.mindcrime!2,S \ + testdir4/1220863042.12663_1.mindcrime!2,S \ + testdir4/1283599333.1840_11.cthulhu!2, \ + testdir4/1305664394.2171_402.cthulhu!2, \ + testdir4/1252168370_3.14675.cthulhu!2,S \ + testdir4/mail1 \ + testdir4/mail5 \ + testdir4/181736.eml \ + testdir4/encrypted!2,S \ + testdir4/multimime!2,FS \ + testdir4/signed!2,S \ + testdir4/signed-bad!2,S \ + testdir4/signed-encrypted!2,S \ + testdir4/special!2,Sabc + +TESTS=$(TEST_PROGS) + +include $(top_srcdir)/aminclude_static.am diff --git a/lib/tests/test-mu-common.c b/lib/test-mu-common.c similarity index 100% rename from lib/tests/test-mu-common.c rename to lib/test-mu-common.c diff --git a/lib/tests/test-mu-common.h b/lib/test-mu-common.h similarity index 100% rename from lib/tests/test-mu-common.h rename to lib/test-mu-common.h diff --git a/lib/tests/test-mu-contacts.cc b/lib/test-mu-contacts.cc similarity index 100% rename from lib/tests/test-mu-contacts.cc rename to lib/test-mu-contacts.cc diff --git a/lib/tests/test-mu-container.c b/lib/test-mu-container.c similarity index 100% rename from lib/tests/test-mu-container.c rename to lib/test-mu-container.c diff --git a/lib/tests/test-mu-date.c b/lib/test-mu-date.c similarity index 100% rename from lib/tests/test-mu-date.c rename to lib/test-mu-date.c diff --git a/lib/tests/test-mu-flags.c b/lib/test-mu-flags.c similarity index 100% rename from lib/tests/test-mu-flags.c rename to lib/test-mu-flags.c diff --git a/lib/tests/test-mu-maildir.c b/lib/test-mu-maildir.c similarity index 100% rename from lib/tests/test-mu-maildir.c rename to lib/test-mu-maildir.c diff --git a/lib/tests/test-mu-msg-fields.c b/lib/test-mu-msg-fields.c similarity index 100% rename from lib/tests/test-mu-msg-fields.c rename to lib/test-mu-msg-fields.c diff --git a/lib/tests/test-mu-msg.c b/lib/test-mu-msg.c similarity index 100% rename from lib/tests/test-mu-msg.c rename to lib/test-mu-msg.c diff --git a/lib/tests/test-mu-store.c b/lib/test-mu-store.c similarity index 100% rename from lib/tests/test-mu-store.c rename to lib/test-mu-store.c diff --git a/lib/tests/testdir/cur/1220863042.12663_1.mindcrime!2,S b/lib/testdir/cur/1220863042.12663_1.mindcrime!2,S similarity index 100% rename from lib/tests/testdir/cur/1220863042.12663_1.mindcrime!2,S rename to lib/testdir/cur/1220863042.12663_1.mindcrime!2,S diff --git a/lib/tests/testdir/cur/1220863060.12663_3.mindcrime!2,S b/lib/testdir/cur/1220863060.12663_3.mindcrime!2,S similarity index 100% rename from lib/tests/testdir/cur/1220863060.12663_3.mindcrime!2,S rename to lib/testdir/cur/1220863060.12663_3.mindcrime!2,S diff --git a/lib/tests/testdir/cur/1220863087.12663_15.mindcrime!2,PS b/lib/testdir/cur/1220863087.12663_15.mindcrime!2,PS similarity index 100% rename from lib/tests/testdir/cur/1220863087.12663_15.mindcrime!2,PS rename to lib/testdir/cur/1220863087.12663_15.mindcrime!2,PS diff --git a/lib/tests/testdir/cur/1220863087.12663_19.mindcrime!2,S b/lib/testdir/cur/1220863087.12663_19.mindcrime!2,S similarity index 100% rename from lib/tests/testdir/cur/1220863087.12663_19.mindcrime!2,S rename to lib/testdir/cur/1220863087.12663_19.mindcrime!2,S diff --git a/lib/tests/testdir/cur/1220863087.12663_5.mindcrime!2,S b/lib/testdir/cur/1220863087.12663_5.mindcrime!2,S similarity index 100% rename from lib/tests/testdir/cur/1220863087.12663_5.mindcrime!2,S rename to lib/testdir/cur/1220863087.12663_5.mindcrime!2,S diff --git a/lib/tests/testdir/cur/1220863087.12663_7.mindcrime!2,RS b/lib/testdir/cur/1220863087.12663_7.mindcrime!2,RS similarity index 100% rename from lib/tests/testdir/cur/1220863087.12663_7.mindcrime!2,RS rename to lib/testdir/cur/1220863087.12663_7.mindcrime!2,RS diff --git a/lib/tests/testdir/cur/1252168370_3.14675.cthulhu!2,S b/lib/testdir/cur/1252168370_3.14675.cthulhu!2,S similarity index 100% rename from lib/tests/testdir/cur/1252168370_3.14675.cthulhu!2,S rename to lib/testdir/cur/1252168370_3.14675.cthulhu!2,S diff --git a/lib/tests/testdir/cur/1283599333.1840_11.cthulhu!2, b/lib/testdir/cur/1283599333.1840_11.cthulhu!2, similarity index 100% rename from lib/tests/testdir/cur/1283599333.1840_11.cthulhu!2, rename to lib/testdir/cur/1283599333.1840_11.cthulhu!2, diff --git a/lib/tests/testdir/cur/1305664394.2171_402.cthulhu!2, b/lib/testdir/cur/1305664394.2171_402.cthulhu!2, similarity index 100% rename from lib/tests/testdir/cur/1305664394.2171_402.cthulhu!2, rename to lib/testdir/cur/1305664394.2171_402.cthulhu!2, diff --git a/lib/tests/testdir/cur/encrypted!2,S b/lib/testdir/cur/encrypted!2,S similarity index 100% rename from lib/tests/testdir/cur/encrypted!2,S rename to lib/testdir/cur/encrypted!2,S diff --git a/lib/tests/testdir/cur/multimime!2,FS b/lib/testdir/cur/multimime!2,FS similarity index 100% rename from lib/tests/testdir/cur/multimime!2,FS rename to lib/testdir/cur/multimime!2,FS diff --git a/lib/tests/testdir/cur/multirecip!2,S b/lib/testdir/cur/multirecip!2,S similarity index 100% rename from lib/tests/testdir/cur/multirecip!2,S rename to lib/testdir/cur/multirecip!2,S diff --git a/lib/tests/testdir/cur/signed!2,S b/lib/testdir/cur/signed!2,S similarity index 100% rename from lib/tests/testdir/cur/signed!2,S rename to lib/testdir/cur/signed!2,S diff --git a/lib/tests/testdir/cur/signed-encrypted!2,S b/lib/testdir/cur/signed-encrypted!2,S similarity index 100% rename from lib/tests/testdir/cur/signed-encrypted!2,S rename to lib/testdir/cur/signed-encrypted!2,S diff --git a/lib/tests/testdir/cur/special!2,Sabc b/lib/testdir/cur/special!2,Sabc similarity index 100% rename from lib/tests/testdir/cur/special!2,Sabc rename to lib/testdir/cur/special!2,Sabc diff --git a/lib/tests/testdir/new/1220863087.12663_21.mindcrime b/lib/testdir/new/1220863087.12663_21.mindcrime similarity index 100% rename from lib/tests/testdir/new/1220863087.12663_21.mindcrime rename to lib/testdir/new/1220863087.12663_21.mindcrime diff --git a/lib/tests/testdir/new/1220863087.12663_23.mindcrime b/lib/testdir/new/1220863087.12663_23.mindcrime similarity index 100% rename from lib/tests/testdir/new/1220863087.12663_23.mindcrime rename to lib/testdir/new/1220863087.12663_23.mindcrime diff --git a/lib/tests/testdir/new/1220863087.12663_25.mindcrime b/lib/testdir/new/1220863087.12663_25.mindcrime similarity index 100% rename from lib/tests/testdir/new/1220863087.12663_25.mindcrime rename to lib/testdir/new/1220863087.12663_25.mindcrime diff --git a/lib/tests/testdir/new/1220863087.12663_9.mindcrime b/lib/testdir/new/1220863087.12663_9.mindcrime similarity index 100% rename from lib/tests/testdir/new/1220863087.12663_9.mindcrime rename to lib/testdir/new/1220863087.12663_9.mindcrime diff --git a/lib/tests/testdir/tmp/1220863087.12663.ignore b/lib/testdir/tmp/1220863087.12663.ignore similarity index 100% rename from lib/tests/testdir/tmp/1220863087.12663.ignore rename to lib/testdir/tmp/1220863087.12663.ignore diff --git a/lib/tests/testdir2/Foo/cur/arto.eml b/lib/testdir2/Foo/cur/arto.eml similarity index 100% rename from lib/tests/testdir2/Foo/cur/arto.eml rename to lib/testdir2/Foo/cur/arto.eml diff --git a/lib/tests/testdir2/Foo/cur/fraiche.eml b/lib/testdir2/Foo/cur/fraiche.eml similarity index 100% rename from lib/tests/testdir2/Foo/cur/fraiche.eml rename to lib/testdir2/Foo/cur/fraiche.eml diff --git a/lib/tests/testdir2/Foo/cur/mail5 b/lib/testdir2/Foo/cur/mail5 similarity index 100% rename from lib/tests/testdir2/Foo/cur/mail5 rename to lib/testdir2/Foo/cur/mail5 diff --git a/lib/tests/testdir2/Foo/new/.noindex b/lib/testdir2/Foo/new/.noindex similarity index 100% rename from lib/tests/testdir2/Foo/new/.noindex rename to lib/testdir2/Foo/new/.noindex diff --git a/lib/tests/testdir2/Foo/tmp/.noindex b/lib/testdir2/Foo/tmp/.noindex similarity index 100% rename from lib/tests/testdir2/Foo/tmp/.noindex rename to lib/testdir2/Foo/tmp/.noindex diff --git a/lib/tests/testdir2/bar/cur/181736.eml b/lib/testdir2/bar/cur/181736.eml similarity index 100% rename from lib/tests/testdir2/bar/cur/181736.eml rename to lib/testdir2/bar/cur/181736.eml diff --git a/lib/tests/testdir2/bar/cur/mail1 b/lib/testdir2/bar/cur/mail1 similarity index 100% rename from lib/tests/testdir2/bar/cur/mail1 rename to lib/testdir2/bar/cur/mail1 diff --git a/lib/tests/testdir2/bar/cur/mail2 b/lib/testdir2/bar/cur/mail2 similarity index 100% rename from lib/tests/testdir2/bar/cur/mail2 rename to lib/testdir2/bar/cur/mail2 diff --git a/lib/tests/testdir2/bar/cur/mail3 b/lib/testdir2/bar/cur/mail3 similarity index 100% rename from lib/tests/testdir2/bar/cur/mail3 rename to lib/testdir2/bar/cur/mail3 diff --git a/lib/tests/testdir2/bar/cur/mail4 b/lib/testdir2/bar/cur/mail4 similarity index 100% rename from lib/tests/testdir2/bar/cur/mail4 rename to lib/testdir2/bar/cur/mail4 diff --git a/lib/tests/testdir2/bar/cur/mail5 b/lib/testdir2/bar/cur/mail5 similarity index 100% rename from lib/tests/testdir2/bar/cur/mail5 rename to lib/testdir2/bar/cur/mail5 diff --git a/lib/tests/testdir2/bar/cur/mail6 b/lib/testdir2/bar/cur/mail6 similarity index 100% rename from lib/tests/testdir2/bar/cur/mail6 rename to lib/testdir2/bar/cur/mail6 diff --git a/lib/tests/testdir2/bar/new/.noindex b/lib/testdir2/bar/new/.noindex similarity index 100% rename from lib/tests/testdir2/bar/new/.noindex rename to lib/testdir2/bar/new/.noindex diff --git a/lib/tests/testdir2/bar/tmp/.noindex b/lib/testdir2/bar/tmp/.noindex similarity index 100% rename from lib/tests/testdir2/bar/tmp/.noindex rename to lib/testdir2/bar/tmp/.noindex diff --git a/lib/tests/testdir2/wom_bat/cur/atomic b/lib/testdir2/wom_bat/cur/atomic similarity index 100% rename from lib/tests/testdir2/wom_bat/cur/atomic rename to lib/testdir2/wom_bat/cur/atomic diff --git a/lib/tests/testdir2/wom_bat/cur/rfc822.1 b/lib/testdir2/wom_bat/cur/rfc822.1 similarity index 100% rename from lib/tests/testdir2/wom_bat/cur/rfc822.1 rename to lib/testdir2/wom_bat/cur/rfc822.1 diff --git a/lib/tests/testdir2/wom_bat/cur/rfc822.2 b/lib/testdir2/wom_bat/cur/rfc822.2 similarity index 100% rename from lib/tests/testdir2/wom_bat/cur/rfc822.2 rename to lib/testdir2/wom_bat/cur/rfc822.2 diff --git a/lib/tests/testdir3/cycle/cur/cycle0 b/lib/testdir3/cycle/cur/cycle0 similarity index 100% rename from lib/tests/testdir3/cycle/cur/cycle0 rename to lib/testdir3/cycle/cur/cycle0 diff --git a/lib/tests/testdir3/cycle/cur/cycle0.0 b/lib/testdir3/cycle/cur/cycle0.0 similarity index 100% rename from lib/tests/testdir3/cycle/cur/cycle0.0 rename to lib/testdir3/cycle/cur/cycle0.0 diff --git a/lib/tests/testdir3/cycle/cur/cycle0.0.0 b/lib/testdir3/cycle/cur/cycle0.0.0 similarity index 100% rename from lib/tests/testdir3/cycle/cur/cycle0.0.0 rename to lib/testdir3/cycle/cur/cycle0.0.0 diff --git a/lib/tests/testdir3/cycle/cur/rogue0 b/lib/testdir3/cycle/cur/rogue0 similarity index 100% rename from lib/tests/testdir3/cycle/cur/rogue0 rename to lib/testdir3/cycle/cur/rogue0 diff --git a/lib/tests/testdir3/cycle/new/.noindex b/lib/testdir3/cycle/new/.noindex similarity index 100% rename from lib/tests/testdir3/cycle/new/.noindex rename to lib/testdir3/cycle/new/.noindex diff --git a/lib/tests/testdir3/cycle/tmp/.noindex b/lib/testdir3/cycle/tmp/.noindex similarity index 100% rename from lib/tests/testdir3/cycle/tmp/.noindex rename to lib/testdir3/cycle/tmp/.noindex diff --git a/lib/tests/testdir3/sort/1st-child-promotes-thread/cur/A b/lib/testdir3/sort/1st-child-promotes-thread/cur/A similarity index 100% rename from lib/tests/testdir3/sort/1st-child-promotes-thread/cur/A rename to lib/testdir3/sort/1st-child-promotes-thread/cur/A diff --git a/lib/tests/testdir3/sort/1st-child-promotes-thread/cur/B b/lib/testdir3/sort/1st-child-promotes-thread/cur/B similarity index 100% rename from lib/tests/testdir3/sort/1st-child-promotes-thread/cur/B rename to lib/testdir3/sort/1st-child-promotes-thread/cur/B diff --git a/lib/tests/testdir3/sort/1st-child-promotes-thread/cur/C b/lib/testdir3/sort/1st-child-promotes-thread/cur/C similarity index 100% rename from lib/tests/testdir3/sort/1st-child-promotes-thread/cur/C rename to lib/testdir3/sort/1st-child-promotes-thread/cur/C diff --git a/lib/tests/testdir3/sort/1st-child-promotes-thread/cur/D b/lib/testdir3/sort/1st-child-promotes-thread/cur/D similarity index 100% rename from lib/tests/testdir3/sort/1st-child-promotes-thread/cur/D rename to lib/testdir3/sort/1st-child-promotes-thread/cur/D diff --git a/lib/tests/testdir3/sort/1st-child-promotes-thread/new/.noindex b/lib/testdir3/sort/1st-child-promotes-thread/new/.noindex similarity index 100% rename from lib/tests/testdir3/sort/1st-child-promotes-thread/new/.noindex rename to lib/testdir3/sort/1st-child-promotes-thread/new/.noindex diff --git a/lib/tests/testdir3/sort/1st-child-promotes-thread/tmp/.noindex b/lib/testdir3/sort/1st-child-promotes-thread/tmp/.noindex similarity index 100% rename from lib/tests/testdir3/sort/1st-child-promotes-thread/tmp/.noindex rename to lib/testdir3/sort/1st-child-promotes-thread/tmp/.noindex diff --git a/lib/tests/testdir3/sort/2nd-child-promotes-thread/cur/A b/lib/testdir3/sort/2nd-child-promotes-thread/cur/A similarity index 100% rename from lib/tests/testdir3/sort/2nd-child-promotes-thread/cur/A rename to lib/testdir3/sort/2nd-child-promotes-thread/cur/A diff --git a/lib/tests/testdir3/sort/2nd-child-promotes-thread/cur/B b/lib/testdir3/sort/2nd-child-promotes-thread/cur/B similarity index 100% rename from lib/tests/testdir3/sort/2nd-child-promotes-thread/cur/B rename to lib/testdir3/sort/2nd-child-promotes-thread/cur/B diff --git a/lib/tests/testdir3/sort/2nd-child-promotes-thread/cur/C b/lib/testdir3/sort/2nd-child-promotes-thread/cur/C similarity index 100% rename from lib/tests/testdir3/sort/2nd-child-promotes-thread/cur/C rename to lib/testdir3/sort/2nd-child-promotes-thread/cur/C diff --git a/lib/tests/testdir3/sort/2nd-child-promotes-thread/cur/D b/lib/testdir3/sort/2nd-child-promotes-thread/cur/D similarity index 100% rename from lib/tests/testdir3/sort/2nd-child-promotes-thread/cur/D rename to lib/testdir3/sort/2nd-child-promotes-thread/cur/D diff --git a/lib/tests/testdir3/sort/2nd-child-promotes-thread/cur/E b/lib/testdir3/sort/2nd-child-promotes-thread/cur/E similarity index 100% rename from lib/tests/testdir3/sort/2nd-child-promotes-thread/cur/E rename to lib/testdir3/sort/2nd-child-promotes-thread/cur/E diff --git a/lib/tests/testdir3/sort/2nd-child-promotes-thread/new/.noindex b/lib/testdir3/sort/2nd-child-promotes-thread/new/.noindex similarity index 100% rename from lib/tests/testdir3/sort/2nd-child-promotes-thread/new/.noindex rename to lib/testdir3/sort/2nd-child-promotes-thread/new/.noindex diff --git a/lib/tests/testdir3/sort/2nd-child-promotes-thread/tmp/.noindex b/lib/testdir3/sort/2nd-child-promotes-thread/tmp/.noindex similarity index 100% rename from lib/tests/testdir3/sort/2nd-child-promotes-thread/tmp/.noindex rename to lib/testdir3/sort/2nd-child-promotes-thread/tmp/.noindex diff --git a/lib/tests/testdir3/sort/child-does-not-promote-thread/cur/A b/lib/testdir3/sort/child-does-not-promote-thread/cur/A similarity index 100% rename from lib/tests/testdir3/sort/child-does-not-promote-thread/cur/A rename to lib/testdir3/sort/child-does-not-promote-thread/cur/A diff --git a/lib/tests/testdir3/sort/child-does-not-promote-thread/cur/X b/lib/testdir3/sort/child-does-not-promote-thread/cur/X similarity index 100% rename from lib/tests/testdir3/sort/child-does-not-promote-thread/cur/X rename to lib/testdir3/sort/child-does-not-promote-thread/cur/X diff --git a/lib/tests/testdir3/sort/child-does-not-promote-thread/cur/Y b/lib/testdir3/sort/child-does-not-promote-thread/cur/Y similarity index 100% rename from lib/tests/testdir3/sort/child-does-not-promote-thread/cur/Y rename to lib/testdir3/sort/child-does-not-promote-thread/cur/Y diff --git a/lib/tests/testdir3/sort/child-does-not-promote-thread/cur/Z b/lib/testdir3/sort/child-does-not-promote-thread/cur/Z similarity index 100% rename from lib/tests/testdir3/sort/child-does-not-promote-thread/cur/Z rename to lib/testdir3/sort/child-does-not-promote-thread/cur/Z diff --git a/lib/tests/testdir3/sort/child-does-not-promote-thread/new/.noindex b/lib/testdir3/sort/child-does-not-promote-thread/new/.noindex similarity index 100% rename from lib/tests/testdir3/sort/child-does-not-promote-thread/new/.noindex rename to lib/testdir3/sort/child-does-not-promote-thread/new/.noindex diff --git a/lib/tests/testdir3/sort/child-does-not-promote-thread/tmp/.noindex b/lib/testdir3/sort/child-does-not-promote-thread/tmp/.noindex similarity index 100% rename from lib/tests/testdir3/sort/child-does-not-promote-thread/tmp/.noindex rename to lib/testdir3/sort/child-does-not-promote-thread/tmp/.noindex diff --git a/lib/tests/testdir3/sort/grandchild-promotes-only-subthread/cur/A b/lib/testdir3/sort/grandchild-promotes-only-subthread/cur/A similarity index 100% rename from lib/tests/testdir3/sort/grandchild-promotes-only-subthread/cur/A rename to lib/testdir3/sort/grandchild-promotes-only-subthread/cur/A diff --git a/lib/tests/testdir3/sort/grandchild-promotes-only-subthread/cur/B b/lib/testdir3/sort/grandchild-promotes-only-subthread/cur/B similarity index 100% rename from lib/tests/testdir3/sort/grandchild-promotes-only-subthread/cur/B rename to lib/testdir3/sort/grandchild-promotes-only-subthread/cur/B diff --git a/lib/tests/testdir3/sort/grandchild-promotes-only-subthread/cur/C b/lib/testdir3/sort/grandchild-promotes-only-subthread/cur/C similarity index 100% rename from lib/tests/testdir3/sort/grandchild-promotes-only-subthread/cur/C rename to lib/testdir3/sort/grandchild-promotes-only-subthread/cur/C diff --git a/lib/tests/testdir3/sort/grandchild-promotes-only-subthread/cur/D b/lib/testdir3/sort/grandchild-promotes-only-subthread/cur/D similarity index 100% rename from lib/tests/testdir3/sort/grandchild-promotes-only-subthread/cur/D rename to lib/testdir3/sort/grandchild-promotes-only-subthread/cur/D diff --git a/lib/tests/testdir3/sort/grandchild-promotes-only-subthread/cur/E b/lib/testdir3/sort/grandchild-promotes-only-subthread/cur/E similarity index 100% rename from lib/tests/testdir3/sort/grandchild-promotes-only-subthread/cur/E rename to lib/testdir3/sort/grandchild-promotes-only-subthread/cur/E diff --git a/lib/tests/testdir3/sort/grandchild-promotes-only-subthread/cur/F b/lib/testdir3/sort/grandchild-promotes-only-subthread/cur/F similarity index 100% rename from lib/tests/testdir3/sort/grandchild-promotes-only-subthread/cur/F rename to lib/testdir3/sort/grandchild-promotes-only-subthread/cur/F diff --git a/lib/tests/testdir3/sort/grandchild-promotes-only-subthread/cur/G b/lib/testdir3/sort/grandchild-promotes-only-subthread/cur/G similarity index 100% rename from lib/tests/testdir3/sort/grandchild-promotes-only-subthread/cur/G rename to lib/testdir3/sort/grandchild-promotes-only-subthread/cur/G diff --git a/lib/tests/testdir3/sort/grandchild-promotes-only-subthread/new/.noindex b/lib/testdir3/sort/grandchild-promotes-only-subthread/new/.noindex similarity index 100% rename from lib/tests/testdir3/sort/grandchild-promotes-only-subthread/new/.noindex rename to lib/testdir3/sort/grandchild-promotes-only-subthread/new/.noindex diff --git a/lib/tests/testdir3/sort/grandchild-promotes-only-subthread/tmp/.noindex b/lib/testdir3/sort/grandchild-promotes-only-subthread/tmp/.noindex similarity index 100% rename from lib/tests/testdir3/sort/grandchild-promotes-only-subthread/tmp/.noindex rename to lib/testdir3/sort/grandchild-promotes-only-subthread/tmp/.noindex diff --git a/lib/tests/testdir3/sort/grandchild-promotes-thread/cur/A b/lib/testdir3/sort/grandchild-promotes-thread/cur/A similarity index 100% rename from lib/tests/testdir3/sort/grandchild-promotes-thread/cur/A rename to lib/testdir3/sort/grandchild-promotes-thread/cur/A diff --git a/lib/tests/testdir3/sort/grandchild-promotes-thread/cur/B b/lib/testdir3/sort/grandchild-promotes-thread/cur/B similarity index 100% rename from lib/tests/testdir3/sort/grandchild-promotes-thread/cur/B rename to lib/testdir3/sort/grandchild-promotes-thread/cur/B diff --git a/lib/tests/testdir3/sort/grandchild-promotes-thread/cur/C b/lib/testdir3/sort/grandchild-promotes-thread/cur/C similarity index 100% rename from lib/tests/testdir3/sort/grandchild-promotes-thread/cur/C rename to lib/testdir3/sort/grandchild-promotes-thread/cur/C diff --git a/lib/tests/testdir3/sort/grandchild-promotes-thread/cur/D b/lib/testdir3/sort/grandchild-promotes-thread/cur/D similarity index 100% rename from lib/tests/testdir3/sort/grandchild-promotes-thread/cur/D rename to lib/testdir3/sort/grandchild-promotes-thread/cur/D diff --git a/lib/tests/testdir3/sort/grandchild-promotes-thread/cur/E b/lib/testdir3/sort/grandchild-promotes-thread/cur/E similarity index 100% rename from lib/tests/testdir3/sort/grandchild-promotes-thread/cur/E rename to lib/testdir3/sort/grandchild-promotes-thread/cur/E diff --git a/lib/tests/testdir3/sort/grandchild-promotes-thread/new/.noindex b/lib/testdir3/sort/grandchild-promotes-thread/new/.noindex similarity index 100% rename from lib/tests/testdir3/sort/grandchild-promotes-thread/new/.noindex rename to lib/testdir3/sort/grandchild-promotes-thread/new/.noindex diff --git a/lib/tests/testdir3/sort/grandchild-promotes-thread/tmp/.noindex b/lib/testdir3/sort/grandchild-promotes-thread/tmp/.noindex similarity index 100% rename from lib/tests/testdir3/sort/grandchild-promotes-thread/tmp/.noindex rename to lib/testdir3/sort/grandchild-promotes-thread/tmp/.noindex diff --git a/lib/tests/testdir3/tree/cur/child0.0 b/lib/testdir3/tree/cur/child0.0 similarity index 100% rename from lib/tests/testdir3/tree/cur/child0.0 rename to lib/testdir3/tree/cur/child0.0 diff --git a/lib/tests/testdir3/tree/cur/child0.1 b/lib/testdir3/tree/cur/child0.1 similarity index 100% rename from lib/tests/testdir3/tree/cur/child0.1 rename to lib/testdir3/tree/cur/child0.1 diff --git a/lib/tests/testdir3/tree/cur/child0.1.0 b/lib/testdir3/tree/cur/child0.1.0 similarity index 100% rename from lib/tests/testdir3/tree/cur/child0.1.0 rename to lib/testdir3/tree/cur/child0.1.0 diff --git a/lib/tests/testdir3/tree/cur/child2.0.0 b/lib/testdir3/tree/cur/child2.0.0 similarity index 100% rename from lib/tests/testdir3/tree/cur/child2.0.0 rename to lib/testdir3/tree/cur/child2.0.0 diff --git a/lib/tests/testdir3/tree/cur/child3.0.0.0.0 b/lib/testdir3/tree/cur/child3.0.0.0.0 similarity index 100% rename from lib/tests/testdir3/tree/cur/child3.0.0.0.0 rename to lib/testdir3/tree/cur/child3.0.0.0.0 diff --git a/lib/tests/testdir3/tree/cur/child4.0 b/lib/testdir3/tree/cur/child4.0 similarity index 100% rename from lib/tests/testdir3/tree/cur/child4.0 rename to lib/testdir3/tree/cur/child4.0 diff --git a/lib/tests/testdir3/tree/cur/child4.1 b/lib/testdir3/tree/cur/child4.1 similarity index 100% rename from lib/tests/testdir3/tree/cur/child4.1 rename to lib/testdir3/tree/cur/child4.1 diff --git a/lib/tests/testdir3/tree/cur/root0 b/lib/testdir3/tree/cur/root0 similarity index 100% rename from lib/tests/testdir3/tree/cur/root0 rename to lib/testdir3/tree/cur/root0 diff --git a/lib/tests/testdir3/tree/cur/root1 b/lib/testdir3/tree/cur/root1 similarity index 100% rename from lib/tests/testdir3/tree/cur/root1 rename to lib/testdir3/tree/cur/root1 diff --git a/lib/tests/testdir3/tree/cur/root2 b/lib/testdir3/tree/cur/root2 similarity index 100% rename from lib/tests/testdir3/tree/cur/root2 rename to lib/testdir3/tree/cur/root2 diff --git a/lib/tests/testdir3/tree/new/.noindex b/lib/testdir3/tree/new/.noindex similarity index 100% rename from lib/tests/testdir3/tree/new/.noindex rename to lib/testdir3/tree/new/.noindex diff --git a/lib/tests/testdir3/tree/tmp/.noindex b/lib/testdir3/tree/tmp/.noindex similarity index 100% rename from lib/tests/testdir3/tree/tmp/.noindex rename to lib/testdir3/tree/tmp/.noindex diff --git a/lib/tests/testdir4/1220863042.12663_1.mindcrime!2,S b/lib/testdir4/1220863042.12663_1.mindcrime!2,S similarity index 100% rename from lib/tests/testdir4/1220863042.12663_1.mindcrime!2,S rename to lib/testdir4/1220863042.12663_1.mindcrime!2,S diff --git a/lib/tests/testdir4/1220863087.12663_19.mindcrime!2,S b/lib/testdir4/1220863087.12663_19.mindcrime!2,S similarity index 100% rename from lib/tests/testdir4/1220863087.12663_19.mindcrime!2,S rename to lib/testdir4/1220863087.12663_19.mindcrime!2,S diff --git a/lib/tests/testdir4/1252168370_3.14675.cthulhu!2,S b/lib/testdir4/1252168370_3.14675.cthulhu!2,S similarity index 100% rename from lib/tests/testdir4/1252168370_3.14675.cthulhu!2,S rename to lib/testdir4/1252168370_3.14675.cthulhu!2,S diff --git a/lib/tests/testdir4/1283599333.1840_11.cthulhu!2, b/lib/testdir4/1283599333.1840_11.cthulhu!2, similarity index 100% rename from lib/tests/testdir4/1283599333.1840_11.cthulhu!2, rename to lib/testdir4/1283599333.1840_11.cthulhu!2, diff --git a/lib/tests/testdir4/1305664394.2171_402.cthulhu!2, b/lib/testdir4/1305664394.2171_402.cthulhu!2, similarity index 100% rename from lib/tests/testdir4/1305664394.2171_402.cthulhu!2, rename to lib/testdir4/1305664394.2171_402.cthulhu!2, diff --git a/lib/tests/testdir4/181736.eml b/lib/testdir4/181736.eml similarity index 100% rename from lib/tests/testdir4/181736.eml rename to lib/testdir4/181736.eml diff --git a/lib/tests/testdir4/encrypted!2,S b/lib/testdir4/encrypted!2,S similarity index 100% rename from lib/tests/testdir4/encrypted!2,S rename to lib/testdir4/encrypted!2,S diff --git a/lib/tests/testdir4/mail1 b/lib/testdir4/mail1 similarity index 100% rename from lib/tests/testdir4/mail1 rename to lib/testdir4/mail1 diff --git a/lib/tests/testdir4/mail5 b/lib/testdir4/mail5 similarity index 100% rename from lib/tests/testdir4/mail5 rename to lib/testdir4/mail5 diff --git a/lib/tests/testdir4/multimime!2,FS b/lib/testdir4/multimime!2,FS similarity index 100% rename from lib/tests/testdir4/multimime!2,FS rename to lib/testdir4/multimime!2,FS diff --git a/lib/tests/testdir4/signed!2,S b/lib/testdir4/signed!2,S similarity index 100% rename from lib/tests/testdir4/signed!2,S rename to lib/testdir4/signed!2,S diff --git a/lib/tests/testdir4/signed-bad!2,S b/lib/testdir4/signed-bad!2,S similarity index 100% rename from lib/tests/testdir4/signed-bad!2,S rename to lib/testdir4/signed-bad!2,S diff --git a/lib/tests/testdir4/signed-encrypted!2,S b/lib/testdir4/signed-encrypted!2,S similarity index 100% rename from lib/tests/testdir4/signed-encrypted!2,S rename to lib/testdir4/signed-encrypted!2,S diff --git a/lib/tests/testdir4/special!2,Sabc b/lib/testdir4/special!2,Sabc similarity index 100% rename from lib/tests/testdir4/special!2,Sabc rename to lib/testdir4/special!2,Sabc diff --git a/lib/tests/Makefile.am b/lib/tests/Makefile.am deleted file mode 100644 index 839cd5a4..00000000 --- a/lib/tests/Makefile.am +++ /dev/null @@ -1,191 +0,0 @@ -## Copyright (C) 2008-2015 Dirk-Jan C. Binnema -## -## 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, 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. - -include $(top_srcdir)/gtest.mk - -AM_CPPFLAGS=$(XAPIAN_CXXFLAGS) \ - $(GMIME_CFLAGS) \ - $(GLIB_CFLAGS) \ - -I ${top_srcdir} \ - -I ${top_srcdir}/lib \ - -DMU_TESTMAILDIR=\"${abs_srcdir}/testdir\" \ - -DMU_TESTMAILDIR2=\"${abs_srcdir}/testdir2\" \ - -DMU_TESTMAILDIR3=\"${abs_srcdir}/testdir3\" \ - -DMU_TESTMAILDIR4=\"${abs_srcdir}/testdir4\" \ - -DABS_CURDIR=\"${abs_builddir}\" \ - -DABS_SRCDIR=\"${abs_srcdir}\" - -# don't use -Werror, as it might break on other compilers -# use -Wno-unused-parameters, because some callbacks may not -# really need all the params they get -AM_CFLAGS= \ - $(JSON_GLIB_CFLAGS) \ - $(WARN_CFLAGS) \ - $(ASAN_CFLAGS) -AM_CXXFLAGS= \ - $(WARN_CXXFLAGS) \ - $(ASAN_CXXFLAGS) - -AM_LDFLAGS= \ - $(ASAN_LDFLAGS) - -noinst_PROGRAMS= $(TEST_PROGS) - -noinst_LTLIBRARIES=libtestmucommon.la - -TEST_PROGS += test-mu-maildir -test_mu_maildir_SOURCES= test-mu-maildir.c dummy.cc -test_mu_maildir_LDADD= libtestmucommon.la - -TEST_PROGS += test-mu-msg-fields -test_mu_msg_fields_SOURCES= test-mu-msg-fields.c dummy.cc -test_mu_msg_fields_LDADD= libtestmucommon.la - -TEST_PROGS += test-mu-msg -test_mu_msg_SOURCES= test-mu-msg.c dummy.cc -test_mu_msg_LDADD= libtestmucommon.la - -TEST_PROGS += test-mu-store -test_mu_store_SOURCES= test-mu-store.c dummy.cc -test_mu_store_LDADD= libtestmucommon.la - -TEST_PROGS += test-mu-flags -test_mu_flags_SOURCES= test-mu-flags.c dummy.cc -test_mu_flags_LDADD= libtestmucommon.la - -TEST_PROGS += test-mu-container -test_mu_container_SOURCES= test-mu-container.c dummy.cc -test_mu_container_LDADD= libtestmucommon.la - -TEST_PROGS += test-mu-contacts -test_mu_contacts_SOURCES= test-mu-contacts.cc -test_mu_contacts_LDADD= libtestmucommon.la - -# we need to use dummy.cc to enforce c++ linking... -BUILT_SOURCES= \ - dummy.cc - -dummy.cc: - touch dummy.cc - -libtestmucommon_la_SOURCES= \ - test-mu-common.c \ - test-mu-common.h -libtestmucommon_la_LIBADD= ../libmu.la - - -# note the question marks; make does not like files with ':', so we -# use the (also supported) version with '!' instead. We could escape -# the : with \: but automake does not recognize that.... - -# test messages, the '.ignore' message should be ignored -# when indexing -EXTRA_DIST= \ - testdir/tmp/1220863087.12663.ignore \ - testdir/new/1220863087.12663_9.mindcrime \ - testdir/new/1220863087.12663_25.mindcrime \ - testdir/new/1220863087.12663_21.mindcrime \ - testdir/new/1220863087.12663_23.mindcrime \ - testdir/cur/1220863087.12663_5.mindcrime!2,S \ - testdir/cur/1220863087.12663_7.mindcrime!2,RS \ - testdir/cur/1220863087.12663_15.mindcrime!2,PS \ - testdir/cur/1220863087.12663_19.mindcrime!2,S \ - testdir/cur/1220863042.12663_1.mindcrime!2,S \ - testdir/cur/1220863060.12663_3.mindcrime!2,S \ - testdir/cur/1283599333.1840_11.cthulhu!2, \ - testdir/cur/1305664394.2171_402.cthulhu!2, \ - testdir/cur/1252168370_3.14675.cthulhu!2,S \ - testdir/cur/encrypted!2,S \ - testdir/cur/multimime!2,FS \ - testdir/cur/signed!2,S \ - testdir/cur/signed-encrypted!2,S \ - testdir/cur/special!2,Sabc \ - testdir/cur/multirecip!2,S \ - testdir2/bar/cur/mail1 \ - testdir2/bar/cur/mail2 \ - testdir2/bar/cur/mail3 \ - testdir2/bar/cur/mail4 \ - testdir2/bar/cur/mail5 \ - testdir2/bar/cur/181736.eml \ - testdir2/bar/cur/mail6 \ - testdir2/bar/tmp/.noindex \ - testdir2/bar/new/.noindex \ - testdir2/Foo/cur/mail5 \ - testdir2/Foo/cur/arto.eml \ - testdir2/Foo/cur/fraiche.eml \ - testdir2/Foo/tmp/.noindex \ - testdir2/Foo/new/.noindex \ - testdir2/wom_bat/cur/atomic \ - testdir2/wom_bat/cur/rfc822.1 \ - testdir2/wom_bat/cur/rfc822.2 \ - testdir3/cycle \ - testdir3/cycle/new/.noindex \ - testdir3/cycle/cur/rogue0 \ - testdir3/cycle/cur/cycle0 \ - testdir3/cycle/cur/cycle0.0 \ - testdir3/cycle/cur/cycle0.0.0 \ - testdir3/cycle/tmp/.noindex \ - testdir3/tree/new/.noindex \ - testdir3/tree/cur/child0.0 \ - testdir3/tree/cur/child4.0 \ - testdir3/tree/cur/root2 \ - testdir3/tree/cur/root1 \ - testdir3/tree/cur/child3.0.0.0.0 \ - testdir3/tree/cur/root0 \ - testdir3/tree/cur/child2.0.0 \ - testdir3/tree/cur/child0.1 \ - testdir3/tree/cur/child0.1.0 \ - testdir3/tree/cur/child4.1 \ - testdir3/tree/tmp/.noindex \ - testdir3/sort/1st-child-promotes-thread/cur/A \ - testdir3/sort/1st-child-promotes-thread/cur/B \ - testdir3/sort/1st-child-promotes-thread/cur/C \ - testdir3/sort/1st-child-promotes-thread/cur/D \ - testdir3/sort/2nd-child-promotes-thread/cur/A \ - testdir3/sort/2nd-child-promotes-thread/cur/B \ - testdir3/sort/2nd-child-promotes-thread/cur/C \ - testdir3/sort/2nd-child-promotes-thread/cur/D \ - testdir3/sort/2nd-child-promotes-thread/cur/E \ - testdir3/sort/child-does-not-promote-thread/cur/A \ - testdir3/sort/child-does-not-promote-thread/cur/X \ - testdir3/sort/child-does-not-promote-thread/cur/Y \ - testdir3/sort/child-does-not-promote-thread/cur/Z \ - testdir3/sort/grandchild-promotes-only-subthread/cur/A \ - testdir3/sort/grandchild-promotes-only-subthread/cur/B \ - testdir3/sort/grandchild-promotes-only-subthread/cur/C \ - testdir3/sort/grandchild-promotes-only-subthread/cur/D \ - testdir3/sort/grandchild-promotes-only-subthread/cur/E \ - testdir3/sort/grandchild-promotes-only-subthread/cur/F \ - testdir3/sort/grandchild-promotes-only-subthread/cur/G \ - testdir3/sort/grandchild-promotes-thread/cur/A \ - testdir3/sort/grandchild-promotes-thread/cur/B \ - testdir3/sort/grandchild-promotes-thread/cur/C \ - testdir3/sort/grandchild-promotes-thread/cur/D \ - testdir3/sort/grandchild-promotes-thread/cur/E \ - testdir4/1220863087.12663_19.mindcrime!2,S \ - testdir4/1220863042.12663_1.mindcrime!2,S \ - testdir4/1283599333.1840_11.cthulhu!2, \ - testdir4/1305664394.2171_402.cthulhu!2, \ - testdir4/1252168370_3.14675.cthulhu!2,S \ - testdir4/mail1 \ - testdir4/mail5 \ - testdir4/181736.eml \ - testdir4/encrypted!2,S \ - testdir4/multimime!2,FS \ - testdir4/signed!2,S \ - testdir4/signed-bad!2,S \ - testdir4/signed-encrypted!2,S \ - testdir4/special!2,Sabc diff --git a/lib/tests/dummy.cc b/lib/tests/dummy.cc deleted file mode 100644 index e69de29b..00000000 diff --git a/man/mu-mfind.1 b/man/mu-mfind.1 deleted file mode 100644 index c1166d04..00000000 --- a/man/mu-mfind.1 +++ /dev/null @@ -1,390 +0,0 @@ -.TH MU FIND 1 "19 April 2015" "User Manuals" - -.SH NAME - -mu find \- find e-mail messages in the \fBmu\fR database. - -mu mfind \- find e-mail messages in the \fBmu\fR database with mu4e defaults. - -.SH SYNOPSIS - -.B mu find [options] - -.SH DESCRIPTION - -\fBmu find\fR is the \fBmu\fR command for searching e-mail message -that were stored earlier using \fBmu index\fR(1). - -\fBmu mfind\fR is a version of \fBmu find\fR that defaults to -\f--include-related\fR and \fB--skip-dups\fR, just like \fBmu4e\fR does. - -.SH SEARCHING MAIL - -\fBmu find\fR starts a search for messages in the database that match -some search pattern. The search patterns are described in detail in -.BR mu-query (7). -. - -For example: - -.nf - $ mu find subject:snow and date:2017.. -.fi - -would find all messages in 2017 with 'snow' in the subject field, e.g: - -.nf - 2009-03-05 17:57:33 EET Lucia running in the snow - 2009-03-05 18:38:24 EET Marius Re: running in the snow -.fi - -Note, this the default, plain-text output, which is the default, so you don't -have to use \fB--format=plain\fR. For other types of output (such as symlinks, -XML or s-expressions), see the discussion in the \fBOPTIONS\fR-section -below about \fB--format\fR. - -The search pattern is taken as a command-line parameter. If the search -parameter consists of multiple parts (as in the example) they are -treated as if there were a logical \fBand\fR between them. - -For details on the possible queries, see - - - -.SH OPTIONS - -Note, some of the important options are described in the \fBmu\fR(1) man-page -and not here, as they apply to multiple mu-commands. - -The \fBfind\fR-command has various options that influence the way \fBmu\fR -displays the results. If you don't specify anything, the defaults are -\fI\-\-fields="d f s"\fR, \fI\-\-sortfield=date\fR and \fI\-\-reverse\fR. - -.TP -\fB\-f\fR, \fB\-\-fields\fR=\fI\fR -specifies a string that determines which fields are shown in the output. This -string consists of a number of characters (such as 's' for subject or 'f' for -from), which will replace with the actual field in the output. Fields that are -not known will be output as-is, allowing for some simple formatting. - -For example: - -.nf - $ mu find subject:snow --fields "d f s" -.fi - -would list the date, subject and sender of all messages with 'snow' in the -their subject. - -The table of replacement characters is superset of the list mentions for -search parameters; the complete list: - -.nf - t \fBt\fRo: recipient - c \fBc\fRc: (carbon-copy) recipient - h Bcc: (blind carbon-copy, \fBh\fRidden) recipient - d Sent \fBd\fRate of the message - f Message sender (\fBf\fRrom:) - g Message flags (fla\fBg\fRs) - l Full path to the message (\fBl\fRocation) - p Message \fBp\fRriority (high, normal, low) - s Message \fBs\fRubject - i Message-\fBi\fRd - m \fBm\fRaildir - v Mailing-list Id -.fi - - -The message flags are described in \fBmu-query\fR(7). As an example, a -message which is 'seen', has an attachment and is signed would -have 'asz' as its corresponding output string, while an encrypted new -message would have 'nx'. - -.TP -\fB\-s\fR, \fB\-\-sortfield\fR \fR=\fI\fR and \fB\-z\fR, -\fB\-\-reverse\fR specifies the field to sort the search results by, and the -direction (i.e., 'reverse' means that the sort should be reverted - Z-A). The -following fields are supported: - -.nf - cc,c Cc (carbon-copy) recipient(s) - bcc,h Bcc (blind-carbon-copy) recipient(s) - date,d Message sent date - from,f Message sender - maildir,m Maildir - msgid,i Message id - prio,p Nessage priority - subject,s Message subject - to,t To:-recipient(s) - list,v Mailing-list id -.fi - -Thus, for example, to sort messages by date, you could specify: - -.nf - $ mu find fahrrad --fields "d f s" --sortfield=date --reverse -.fi - -Note, if you specify a sortfield, by default, messages are sorted in reverse -(descending) order (e.g., from lowest to highest). This is usually a good -choice, but for dates it may be more useful to sort in the opposite direction. - -.TP -\fB\-n\fR, \fB\-\-maxnum=\fR -If > 0, display maximally that number of entries. If not specified, all matching entries are displayed. - -.TP -\fB\-\-summary-len=\fR -If > 0, use that number of lines of the message to provide a summary. - -.TP -\fB\-\-format\fR=\fIplain|links|xquery|xml|sexp\fR -output results in the specified format. - -The default is \fBplain\fR, i.e normal output with one line per message. - -\fBlinks\fR outputs the results as a maildir with symbolic links to the found -messages. This enables easy integration with mail-clients (see below for more -information). - -\fBxml\fR formats the search results as XML. - -\fBsexp\fR formats the search results as an s-expression as used in Lisp -programming environments. - -\fBxquery\fR shows the Xapian query corresponding to your search terms. This -is meant for for debugging purposes. - -.TP -\fB\-\-linksdir\fR \fR=\fI\fR and \fB\-c\fR, \fB\-\-clearlinks\fR -output the results as a maildir with symbolic links to the found -messages. This enables easy integration with mail-clients (see below -for more information). \fBmu\fR will create the maildir if it does not -exist yet. - -If you specify \fB\-\-clearlinks\fR, all existing symlinks will be -cleared from the target directories; this allows for re-use of the -same maildir. However, this option will delete any symlink it finds, -so be careful. - -.nf - $ mu find grolsch --linksdir=~/Maildir/search --clearlinks -.fi - -will store links to found messages in \fI~/Maildir/search\fR. If the directory -does not exist yet, it will be created. - -Note: when \fBmu\fR creates a Maildir for these links, it automatically -inserts a \fI.noindex\fR file, to exclude the directory from \fBmu -index\fR. - -.TP -\fB\-\-after=\fR\fI\fR only show messages whose message files were -last modified (\fBmtime\fR) after \fI\fR. \fI\fR is a -UNIX \fBtime_t\fR value, the number of seconds since 1970-01-01 (in UTC). - -From the command line, you can use the \fBdate\fR command to get this -value. For example, only consider messages modified (or created) in the last 5 -minutes, you could specify -.nf - --after=`date +%s --date='5 min ago'` -.fi -This is assuming the GNU \fBdate\fR command. - - -.TP -\fB\-\-exec\fR=\fI\fR -the \fB\-\-exec\fR command causes the \fIcommand\fR to be executed on each -matched message; for example, to see the raw text of all messages -matching 'milkshake', you could use: -.nf - $ mu find milkshake --exec='less' -.fi -which is roughly equivalent to: -.nf - $ mu find milkshake --fields="l" | xargs less -.fi - - -.TP -\fB\-b\fR, \fB\-\-bookmark\fR=\fI\fR -use a bookmarked search query. Using this option, a query from your bookmark -file will be prepended to other search queries. See \fBmu-bookmarks\fR(1) for the -details of the bookmarks file. - - -.TP -\fB\-\-skip\-dups\fR,\fB-u\fR whenever there are multiple messages with the -same name, only show the first one. This is useful if you have copies of the -same message, which is a common occurrence when using e.g. Gmail together with -\fBofflineimap\fR. - -.TP -\fB\-\-include\-related\fR,\fB-r\fR also include messages being refered to by -the matched messages -- i.e.. include messages that are part of the same -message thread as some matched messages. This is useful if you want -Gmail-style 'conversations'. Note, finding these related messages make -searches slower. - -.TP -\fB\-t\fR, \fB\-\-threads\fR show messages in a 'threaded' format -- that is, -with indentation and arrows showing the conversation threads in the list of -matching messages. - -Messages in the threaded list are indented based on the depth in the -discussion, and are prefix with a kind of arrow with thread-related -information about the message, as in the following table: - -.nf -| | normal | orphan | duplicate | -|-------------+--------+--------+-----------| -| first child | `-> | `*> | `=> | -| other | |-> | |*> | |=> | -.fi - -Here, an 'orphan' is a message without a parent message (in the list of -matches), and a duplicate is a message whose message-id was already seen -before; not this may not really be the same message, if the message-id was -copied. - -The algorithm used for determining the threads is based on Jamie Zawinksi's -description: -.BR http://www.jwz.org/doc/threading.html - - -.SS Integrating mu find with mail clients - -.TP - -\fBmutt\fR - -For \fBmutt\fR you can use the following in your \fImuttrc\fR; pressing the F8 -key will start a search, and F9 will take you to the results. - -.nf -# mutt macros for mu -macro index "mu find --clearlinks --format=links --linksdir=~/Maildir/search " \\ - "mu find" -macro index "~/Maildir/search" \\ - "mu find results" -.fi - - -.TP - -\fBWanderlust\fR - -\fBSam B\fR suggested the following on the \fBmu\fR-mailing list. First add -the following to your Wanderlust configuration file: - -.nf -(require 'elmo-search) -(elmo-search-register-engine - 'mu 'local-file - :prog "/usr/local/bin/mu" ;; or wherever you've installed it - :args '("find" pattern "--fields" "l") :charset 'utf-8) - -(setq elmo-search-default-engine 'mu) -;; for when you type "g" in folder or summary. -(setq wl-default-spec "[") -.fi - -Now, you can search using the \fBg\fR key binding; you can also create -permanent virtual folders when the messages matching some expression by adding -something like the following to your \fIfolders\fR file. - -.nf -VFolders { - [date:today..now]!mu "Today" - - [size:1m..100m]!mu "Big" - - [flag:unread]!mu "Unread" -} -.fi - -After restarting Wanderlust, the virtual folders should appear. - - -\fBWanderlust (old)\fR - -Another way to integrate \fBmu\fR and \fBwanderlust\fR is shown below; the -aforementioned method is recommended, but if that does not work for some -reason, the below can be an alternative. - -.nf -(defvar mu-wl-mu-program "/usr/local/bin/mu") -(defvar mu-wl-search-folder "search") - -(defun mu-wl-search () - "search for messages with `mu', and jump to the results" - (let* ((muexpr (read-string "Find messages matching: ")) - (sfldr (concat elmo-maildir-folder-path "/" - mu-wl-search-folder)) - (cmdline (concat mu-wl-mu-program " find " - "--clearlinks --format=links --linksdir='" sfldr "' " - muexpr)) - (rv (shell-command cmdline))) - (cond - ((= rv 0) (message "Query succeeded")) - ((= rv 2) (message "No matches found")) - (t (message "Error running query"))) - (= rv 0))) - -(defun mu-wl-search-and-goto () - "search and jump to the folder with the results" - (interactive) - (when (mu-wl-search) - (wl-summary-goto-folder-subr - (concat "." mu-wl-search-folder) - 'force-update nil nil t) - (wl-summary-sort-by-date))) - -;; querying both in summary and folder -(define-key wl-summary-mode-map (kbd "Q") ;; => query - '(lambda()(interactive)(mu-wl-search-and-goto))) -(define-key wl-folder-mode-map (kbd "Q") ;; => query - '(lambda()(interactive)(mu-wl-search-and-goto))) - -.fi - - -.SH RETURN VALUE - -\fBmu find\fR returns 0 upon successful completion; if the search was -performed, there needs to be a least one match. Anything else leads to a -non-zero return value, for example: - -.nf -| code | meaning | -|------+--------------------------------| -| 0 | ok | -| 1 | general error | -| 2 | no matches (for 'mu find') | -| 4 | database is corrupted | -.fi - - -.SH ENCODING - -\fBmu find\fR output is encoded according the locale for \fI--format=plain\fR -(the default), and UTF-8 for all other formats (\fIsexp\fR, -\fIxml\fR). - - -.SH BUGS - -Please report bugs if you find them: -.BR https://github.com/djcb/mu/issues -If you have specific messages which are not matched correctly, please attach -them (appropriately censored if needed). - -.SH AUTHOR - -Dirk-Jan C. Binnema - -.SH "SEE ALSO" - -.BR mu (1), -.BR mu-index (1), -.BR mu-query (7) diff --git a/mu/Makefile.am b/mu/Makefile.am index d43197aa..bdbceb9d 100644 --- a/mu/Makefile.am +++ b/mu/Makefile.am @@ -1,4 +1,4 @@ -## Copyright (C) 2010-2016 Dirk-Jan C. Binnema +## Copyright (C) 2010-2020 Dirk-Jan C. Binnema ## ## 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 @@ -16,59 +16,103 @@ include $(top_srcdir)/gtest.mk -# enforce compiling guile (optionally) first,then this dir first -# before decending into tests/ -SUBDIRS= . tests - -AM_CPPFLAGS=-I${top_srcdir}/lib $(GLIB_CFLAGS) +AM_CPPFLAGS= \ + -I${top_srcdir}/lib \ + $(GLIB_CFLAGS) \ + $(CODE_COVERAGE_CFLAGS) # don't use -Werror, as it might break on other compilers # use -Wno-unused-parameters, because some callbacks may not # really need all the params they get -AM_CFLAGS= \ - $(JSON_GLIB_CFLAGS) \ - $(ASAN_CFLAGS) \ - $(WARN_CFLAGS) \ - -Wno-switch-enum \ +AM_CFLAGS= \ + $(JSON_GLIB_CFLAGS) \ + $(ASAN_CFLAGS) \ + $(WARN_CFLAGS) \ + $(CODE_COVERAGE_CFLAGS) \ + -Wno-switch-enum \ -DMU_SCRIPTS_DIR="\"$(pkgdatadir)/scripts/\"" -AM_CXXFLAGS= \ - $(ASAN_CXXCFLAGS) \ - $(WARN_CXXFLAGS) +AM_CXXFLAGS= \ + $(ASAN_CXXCFLAGS) \ + $(WARN_CXXFLAGS) \ + $(CODE_COVERAGE_CFLAGS) -AM_LDFLAGS= \ +AM_LDFLAGS= \ $(ASAN_LDFLAGS) -bin_PROGRAMS= \ +bin_PROGRAMS= \ mu # note, mu.cc is only '.cc' and not '.c' because libmu must explicitly # be linked as c++, not c. -mu_SOURCES= \ - mu.cc \ - mu-cmd-cfind.c \ - mu-config.c \ - mu-config.h \ - mu-cmd-extract.c \ - mu-cmd-find.c \ - mu-cmd-index.c \ - mu-cmd-server.c \ - mu-cmd-script.c \ - mu-cmd.c \ +mu_SOURCES= \ + mu.cc \ + mu-cmd-cfind.c \ + mu-config.c \ + mu-config.h \ + mu-cmd-extract.c \ + mu-cmd-find.c \ + mu-cmd-index.c \ + mu-cmd-server.c \ + mu-cmd-script.c \ + mu-cmd.c \ mu-cmd.h -BUILT_SOURCES= \ +BUILT_SOURCES= \ mu-help-strings.h mu-help-strings.h: mu-help-strings.txt mu-help-strings.awk $(AM_V_GEN) $(AWK) -f ${top_srcdir}/mu/mu-help-strings.awk < $< > $@ -mu_LDADD= \ - ${top_builddir}/lib/libmu.la \ - $(GLIB_LIBS) +mu_LDADD= \ + ${top_builddir}/lib/libmu.la \ + $(GLIB_LIBS) \ + $(CODE_COVERAGE_LIBS) -EXTRA_DIST= \ - mu-help-strings.awk \ +EXTRA_DIST= \ + mu-help-strings.awk \ mu-help-strings.txt -CLEANFILES=$(BUILT_SOURCES) +noinst_PROGRAMS= $(TEST_PROGS) + +test_cflags= \ + ${AM_CFLAGS} \ + -DMU_TESTMAILDIR=\"${abs_top_srcdir}/lib/testdir\" \ + -DMU_TESTMAILDIR2=\"${abs_top_srcdir}/lib/testdir2\" \ + -DMU_TESTMAILDIR3=\"${abs_top_srcdir}/lib/testdir3\" \ + -DMU_TESTMAILDIR4=\"${abs_top_srcdir}/lib/testdir4\" \ + -DMU_PROGRAM=\"${abs_top_builddir}/mu/mu\" \ + -DABS_CURDIR=\"${abs_builddir}\" \ + -DABS_SRCDIR=\"${abs_srcdir}\" + +TEST_PROGS += test-mu-query +test_mu_query_SOURCES= test-mu-query.c dummy.cc +test_mu_query_CFLAGS=$(test_cflags) +test_mu_query_LDADD=${top_builddir}/lib/libtestmucommon.la $(CODE_COVERAGE_LIBS) + +TEST_PROGS += test-mu-cmd +test_mu_cmd_SOURCES= test-mu-cmd.c dummy.cc +test_mu_cmd_CFLAGS=$(test_cflags) +test_mu_cmd_LDADD=${top_builddir}/lib/libtestmucommon.la $(CODE_COVERAGE_LIBS) + +TEST_PROGS += test-mu-cmd-cfind +test_mu_cmd_cfind_SOURCES= test-mu-cmd-cfind.c dummy.cc +test_mu_cmd_cfind_CFLAGS=$(test_cflags) +test_mu_cmd_cfind_LDADD=${top_builddir}/lib/libtestmucommon.la $(CODE_COVERAGE_LIBS) + +TEST_PROGS += test-mu-threads +test_mu_threads_SOURCES= test-mu-threads.c dummy.cc +test_mu_threads_CFLAGS=$(test_cflags) +test_mu_threads_LDADD=${top_builddir}/lib/libtestmucommon.la $(CODE_COVERAGE_LIBS) + +# we need to use dummy.cc to enforce c++ linking... +BUILT_SOURCES+= \ + dummy.cc +dummy.cc: + touch dummy.cc + +TESTS=$(TEST_PROGS) +include $(top_srcdir)/aminclude_static.am + +CLEANFILES= \ + $(BUILT_SOURCES) diff --git a/mu/tests/test-mu-cmd-cfind.c b/mu/test-mu-cmd-cfind.c similarity index 98% rename from mu/tests/test-mu-cmd-cfind.c rename to mu/test-mu-cmd-cfind.c index 94b6d4a8..72a0c9ff 100644 --- a/mu/tests/test-mu-cmd-cfind.c +++ b/mu/test-mu-cmd-cfind.c @@ -1,6 +1,6 @@ /* -*- mode: c; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- ** -** Copyright (C) 2008-2013 Dirk-Jan C. Binnema +** Copyright (C) 2008-2020 Dirk-Jan C. Binnema ** ** 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 @@ -18,21 +18,18 @@ ** */ -#if HAVE_CONFIG_H #include "config.h" -#endif /*HAVE_CONFIG_H*/ #include #include -#include "../mu-query.h" - #include #include #include #include "test-mu-common.h" #include "mu-store.hh" +#include "mu-query.h" static gchar *CONTACTS_CACHE = NULL; diff --git a/mu/tests/test-mu-cmd.c b/mu/test-mu-cmd.c similarity index 100% rename from mu/tests/test-mu-cmd.c rename to mu/test-mu-cmd.c diff --git a/mu/tests/test-mu-query.c b/mu/test-mu-query.c similarity index 100% rename from mu/tests/test-mu-query.c rename to mu/test-mu-query.c diff --git a/mu/tests/test-mu-runtime.c b/mu/test-mu-runtime.c similarity index 100% rename from mu/tests/test-mu-runtime.c rename to mu/test-mu-runtime.c diff --git a/mu/tests/test-mu-threads.c b/mu/test-mu-threads.c similarity index 100% rename from mu/tests/test-mu-threads.c rename to mu/test-mu-threads.c diff --git a/mu/tests/Makefile.am b/mu/tests/Makefile.am deleted file mode 100644 index dc1d10f6..00000000 --- a/mu/tests/Makefile.am +++ /dev/null @@ -1,69 +0,0 @@ -# Copyright (C) 2008-2013 Dirk-Jan C. Binnema -## -## 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, 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. - -include $(top_srcdir)/gtest.mk - -AM_CPPFLAGS=$(XAPIAN_CXXFLAGS) \ - $(GMIME_CFLAGS) \ - $(GLIB_CFLAGS) \ - -I ${top_srcdir} \ - -I ${top_srcdir}/lib \ - -I ${top_srcdir}/lib/tests \ - -DMU_TESTMAILDIR=\"${abs_top_srcdir}/lib/tests/testdir\" \ - -DMU_TESTMAILDIR2=\"${abs_top_srcdir}/lib/tests/testdir2\" \ - -DMU_TESTMAILDIR3=\"${abs_top_srcdir}/lib/tests/testdir3\" \ - -DMU_TESTMAILDIR4=\"${abs_top_srcdir}/lib/tests/testdir4\" \ - -DMU_PROGRAM=\"${abs_top_builddir}/mu/mu\" \ - -DABS_CURDIR=\"${abs_builddir}\" \ - -DABS_SRCDIR=\"${abs_srcdir}\" - -# don't use -Werror, as it might break on other compilers -# use -Wno-unused-parameters, because some callbacks may not -# really need all the params they get -AM_CFLAGS= \ - $(ASAN_CFLAGS) \ - ${WARN_CFLAGS} - -AM_CXXFLAGS= \ - $(ASAN_CFLAGS) \ - ${WARN_CXXFLAGS} - -AM_LDFLAGS= \ - $(ASAN_LDFLAGS) - -noinst_PROGRAMS= $(TEST_PROGS) - -TEST_PROGS += test-mu-query -test_mu_query_SOURCES= test-mu-query.c dummy.cc -test_mu_query_LDADD=${top_builddir}/lib/tests/libtestmucommon.la - -TEST_PROGS += test-mu-cmd -test_mu_cmd_SOURCES= test-mu-cmd.c dummy.cc -test_mu_cmd_LDADD=${top_builddir}/lib/tests/libtestmucommon.la - -TEST_PROGS += test-mu-cmd-cfind -test_mu_cmd_cfind_SOURCES= test-mu-cmd-cfind.c dummy.cc -test_mu_cmd_cfind_LDADD=${top_builddir}/lib/tests/libtestmucommon.la - -TEST_PROGS += test-mu-threads -test_mu_threads_SOURCES= test-mu-threads.c dummy.cc -test_mu_threads_LDADD=${top_builddir}/lib/tests/libtestmucommon.la - -# we need to use dummy.cc to enforce c++ linking... -BUILT_SOURCES= \ - dummy.cc -dummy.cc: - touch dummy.cc