diff --git a/configure.ac b/configure.ac index b1c102c7..b5336b4c 100644 --- a/configure.ac +++ b/configure.ac @@ -282,7 +282,6 @@ mu4e/mu4e-meta.el guile/Makefile guile/mu/Makefile guile/examples/Makefile -guile/tests/Makefile guile/scripts/Makefile toys/Makefile toys/mug/Makefile diff --git a/contrib/Makefile.am b/contrib/Makefile.am index faaf7cc2..00687a6e 100644 --- a/contrib/Makefile.am +++ b/contrib/Makefile.am @@ -19,13 +19,8 @@ include $(top_srcdir)/gtest.mk AM_CPPFLAGS=$(GMIME_CFLAGS) $(GLIB_CFLAGS) -I${prefix}/include AM_CFLAGS=-Wall -Wextra -Wno-unused-parameter -Wdeclaration-after-statement -pedantic -noinst_PROGRAMS=gmime-test -gmime_test_SOURCES=gmime-test.c -gmime_test_LDADD=$(GMIME_LIBS) $(GLIB_LIBS) - EXTRA_DIST= \ mu-completion.zsh \ mu-sexp-convert \ mu.spec - diff --git a/guile/Makefile.am b/guile/Makefile.am index 048c0e01..85b22625 100644 --- a/guile/Makefile.am +++ b/guile/Makefile.am @@ -18,7 +18,7 @@ include $(top_srcdir)/gtest.mk # note, we need top_builddir for snarfing with 'make distcheck' (ie., # with separate builddir) -SUBDIRS= . mu scripts examples tests +SUBDIRS= . mu scripts examples AM_CPPFLAGS= \ -I. -I${top_builddir} -I${top_srcdir}/lib \ diff --git a/guile/meson.build b/guile/meson.build index bd33ab68..653527be 100644 --- a/guile/meson.build +++ b/guile/meson.build @@ -52,7 +52,6 @@ lib_guile_mu = shared_module( dependencies: [guile_dep, glib_dep, lib_mu_dep, config_h_dep, thread_dep ], install: true) - if makeinfo.found() custom_target('mu_guile_info', input: 'mu-guile.texi', @@ -68,3 +67,7 @@ endif guile_scm_dir=join_paths(datadir, 'guile', 'site', '3.0', 'mu') install_data(['mu.scm','mu/script.scm', 'mu/message.scm', 'mu/stats.scm', 'mu/plot.scm'], install_dir: guile_scm_dir) + +guile_builddir=meson.current_build_dir() + +subdir('tests') diff --git a/guile/tests/Makefile.am b/guile/tests/Makefile.am deleted file mode 100644 index afe893f6..00000000 --- a/guile/tests/Makefile.am +++ /dev/null @@ -1,46 +0,0 @@ -# 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 -## 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_top_srcdir}/lib/testdir\" \ - -DMU_TESTMAILDIR2=\"${abs_top_srcdir}/lib/testdir2\" \ - -DMU_TESTMAILDIR3=\"${abs_top_srcdir}/lib/testdir3\" \ - -DMU_PROGRAM=\"${abs_top_builddir}/mu/mu\" \ - -DMU_GUILE_MODULE_PATH=\"${abs_top_srcdir}/guile/\" \ - -DMU_GUILE_LIBRARY_PATH=\"${abs_top_builddir}/guile/.libs\" \ - -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_CXXFLAGS) ${WARN_CXXFLAGS} -AM_LDFLAGS=$(ASAN_LDFLAGS) - -noinst_PROGRAMS= $(TEST_PROGS) - -TEST_PROGS += test-mu-guile -test_mu_guile_SOURCES= test-mu-guile.cc -test_mu_guile_LDADD=${top_builddir}/lib/libtestmucommon.la - -EXTRA_DIST=test-mu-guile.scm test-mu-guile.cc diff --git a/guile/tests/meson.build b/guile/tests/meson.build new file mode 100644 index 00000000..367c0b68 --- /dev/null +++ b/guile/tests/meson.build @@ -0,0 +1,27 @@ +## Copyright (C) 2021 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 of the License, or +## (at your option) any later version. +## +## This program is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with this program; if not, write to the Free Software Foundation, +## Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + + +test('test_mu_guile', + executable('test-mu-guile', + 'test-mu-guile.cc', + install: false, + cpp_args: [ + '-DABS_SRCDIR="' + meson.current_source_dir() + '"', + '-DMU_GUILE_LIBRARY_PATH="' + guile_builddir + '"', + '-DMU_GUILE_MODULE_PATH="' + guile_builddir + '"' + ], + dependencies: [glib_dep, lib_mu_dep, lib_test_mu_common_dep])) diff --git a/guile/tests/test-mu-guile.cc b/guile/tests/test-mu-guile.cc index dbf622e4..7ffc1128 100644 --- a/guile/tests/test-mu-guile.cc +++ b/guile/tests/test-mu-guile.cc @@ -1,5 +1,5 @@ /* -** Copyright (C) 2012-2020 Dirk-Jan C. Binnema +** Copyright (C) 2012-2021 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 @@ -17,9 +17,7 @@ ** */ -#if HAVE_CONFIG_H #include "config.h" -#endif /*HAVE_CONFIG_H*/ #include #include diff --git a/lib/Makefile.am b/lib/Makefile.am index 84bc9a36..002596de 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -130,122 +130,6 @@ tokenize_LDADD= \ EXTRA_DIST= \ doxyfile.in -noinst_PROGRAMS+=$(TEST_PROGS) - -noinst_LTLIBRARIES+= \ - libtestmucommon.la - -TEST_PROGS += test-maildir -test_maildir_SOURCES= test-mu-maildir.cc -test_maildir_LDADD= libtestmucommon.la - -TEST_PROGS += test-msg-fields -test_msg_fields_SOURCES= test-mu-msg-fields.cc -test_msg_fields_LDADD= libtestmucommon.la - -TEST_PROGS += test-msg -test_msg_SOURCES= test-mu-msg.cc -test_msg_LDADD= libtestmucommon.la - -TEST_PROGS += test-store -test_store_SOURCES= test-mu-store.cc -test_store_LDADD= libtestmucommon.la - -TEST_PROGS += test-query -test_query_SOURCES= test-query.cc -test_query_LDADD= libtestmucommon.la - -TEST_PROGS += test-flags -test_flags_SOURCES= test-mu-flags.cc -test_flags_LDADD= libtestmucommon.la - -TEST_PROGS+=test-tokenizer -test_tokenizer_SOURCES=test-tokenizer.cc -test_tokenizer_LDADD=libtestmucommon.la - -TEST_PROGS+=test-threads -test_threads_SOURCES=mu-query-threads.cc -test_threads_LDADD=libtestmucommon.la -test_threads_CXXFLAGS=$(AM_CXXFLAGS) -DBUILD_TESTS - -TEST_PROGS += test-contacts -test_contacts_SOURCES= mu-contacts.cc -test_contacts_CXXFLAGS=$(AM_CXXFLAGS) -DBUILD_TESTS -test_contacts_LDADD= libtestmucommon.la - -TEST_PROGS+=test-parser -test_parser_SOURCES=test-parser.cc -test_parser_LDADD=libtestmucommon.la - -libtestmucommon_la_SOURCES= \ - test-mu-common.cc \ - test-mu-common.hh - -libtestmucommon_la_LIBADD= \ - libmu.la \ - utils/libmu-utils.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 \ - 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) - CLEANFILES=*.log *.trs *core* *vgdump* *.gcda *.gcno include $(top_srcdir)/aminclude_static.am diff --git a/lib/meson.build b/lib/meson.build index a2e6e0eb..fff334b9 100644 --- a/lib/meson.build +++ b/lib/meson.build @@ -87,79 +87,15 @@ lib_mu_dep = declare_dependency( include_directories: include_directories(['.', '..', xapian_incs])) -# -# tests -# -lib_test_mu_common_inc_dep = declare_dependency( - include_directories: include_directories(['.', '..'])) +# test helpers lib_test_mu_common=static_library('mu-test-common', [ - 'test-mu-common.cc', - 'test-mu-common.hh'], + 'tests/test-mu-common.cc', + 'tests/test-mu-common.hh'], dependencies: [ glib_dep, thread_dep, - lib_test_mu_common_inc_dep]) + config_h_dep]) lib_test_mu_common_dep=declare_dependency( link_with: lib_test_mu_common, - include_directories: include_directories(['.'])) + include_directories: include_directories(['tests'])) - -testmaildir=join_paths(meson.current_source_dir(),'.') - -test('test_maildir', - executable('test-maildir', - 'test-mu-maildir.cc', - install: false, - dependencies: [glib_dep, lib_mu_dep, lib_test_mu_common_dep])) -test('test_msg_fields', - executable('test-msg-fields', - 'test-mu-msg-fields.cc', - install: false, - dependencies: [glib_dep, lib_mu_dep, lib_test_mu_common_dep])) -test('test_msg', - executable('test-msg', - 'test-mu-msg.cc', - install: false, - dependencies: [glib_dep, lib_mu_dep, lib_test_mu_common_dep], - cpp_args:['-DMU_TESTMAILDIR2="'+ join_paths(testmaildir, 'testdir2') + '"', - '-DMU_TESTMAILDIR4="'+ join_paths(testmaildir, 'testdir4') + '"' ])) -test('test_store', - executable('test-store', - 'test-mu-store.cc', - install: false, - dependencies: [glib_dep, lib_mu_dep, lib_test_mu_common_dep], - cpp_args:['-DMU_TESTMAILDIR="'+ join_paths(testmaildir, 'testdir') + '"', - '-DMU_TESTMAILDIR2="'+ join_paths(testmaildir, 'testdir2') + '"', - '-DMU_TESTMAILDIR4="'+ join_paths(testmaildir, 'testdir4') + '"'])) -test('test_query', - executable('test-query', - 'test-query.cc', - install: false, - dependencies: [glib_dep, lib_mu_dep, lib_test_mu_common_dep], - cpp_args:['-DMU_TESTMAILDIR="'+ join_paths(testmaildir, 'testdir') + '"'])) -test('test_flags', - executable('test-flags', - 'test-mu-flags.cc', - install: false, - dependencies: [glib_dep, lib_mu_dep, lib_test_mu_common_dep])) - -test('test_tokenizer', - executable('test-tokenizer', - 'test-tokenizer.cc', - install: false, - dependencies: [glib_dep, lib_mu_dep, lib_test_mu_common_dep])) -test('test_threads', - executable('test-threads', - 'mu-query-threads.cc', - install: false, - cpp_args: ['-DBUILD_TESTS'], - dependencies: [glib_dep, lib_mu_dep, lib_test_mu_common_dep])) -test('test_contacts', - executable('test-contacts', - 'mu-contacts.cc', - install: false, - cpp_args: ['-DBUILD_TESTS'], - dependencies: [glib_dep, lib_mu_dep, lib_test_mu_common_dep])) -test('test_parser', - executable('test-parser', - 'test-parser.cc', - install: false, - dependencies: [glib_dep, lib_mu_dep, lib_test_mu_common_dep])) +# actual tests +subdir('tests') diff --git a/lib/test-mu-date.cc b/lib/test-mu-date.cc deleted file mode 100644 index ba87fbca..00000000 --- a/lib/test-mu-date.cc +++ /dev/null @@ -1,78 +0,0 @@ -/* -*-mode: c; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-*/ - -/* -** 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. -** -*/ - -#if HAVE_CONFIG_H -#include "config.h" -#endif /*HAVE_CONFIG_H*/ - -#include -#include -#include -#include - -#include - -#include "test-mu-common.h" -#include "mu-date.h" - -static void -test_mu_date_interpret_begin(void) -{ - time_t now; - now = time(NULL); - - g_assert_cmpstr(mu_date_interpret_s("now", TRUE), ==, mu_date_str_s("%Y%m%d%H%M%S", now)); - - g_assert_cmpstr(mu_date_interpret_s("today", TRUE), ==, mu_date_str_s("%Y%m%d000000", now)); -} - -static void -test_mu_date_interpret_end(void) -{ - time_t now; - now = time(NULL); - - g_assert_cmpstr(mu_date_interpret_s("now", FALSE), ==, mu_date_str_s("%Y%m%d%H%M%S", now)); - - g_assert_cmpstr(mu_date_interpret_s("today", FALSE), - ==, - mu_date_str_s("%Y%m%d235959", now)); -} - -int -main(int argc, char* argv[]) -{ - g_test_init(&argc, &argv, NULL); - - g_test_add_func("/mu-str/mu_date_parse_hdwmy", test_mu_date_parse_hdwmy); - g_test_add_func("/mu-str/mu_date_complete_begin", test_mu_date_complete_begin); - g_test_add_func("/mu-str/mu_date_complete_end", test_mu_date_complete_end); - - g_test_add_func("/mu-str/mu_date_interpret_begin", test_mu_date_interpret_begin); - g_test_add_func("/mu-str/mu_date_interpret_end", test_mu_date_interpret_end); - - g_log_set_handler(NULL, - G_LOG_LEVEL_MASK | G_LOG_FLAG_FATAL | G_LOG_FLAG_RECURSION, - (GLogFunc)black_hole, - NULL); - - return g_test_run(); -} diff --git a/lib/tests/meson.build b/lib/tests/meson.build new file mode 100644 index 00000000..21f58f1f --- /dev/null +++ b/lib/tests/meson.build @@ -0,0 +1,73 @@ +## Copyright (C) 2021 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 of the License, or +## (at your option) any later version. +## +## This program is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with this program; if not, write to the Free Software Foundation, +## Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +# +# tests +# + +test('test_maildir', + executable('test-maildir', + 'test-mu-maildir.cc', + install: false, + dependencies: [glib_dep, lib_mu_dep, lib_test_mu_common_dep])) +test('test_msg_fields', + executable('test-msg-fields', + 'test-mu-msg-fields.cc', + install: false, + dependencies: [glib_dep, lib_mu_dep, lib_test_mu_common_dep])) +test('test_msg', + executable('test-msg', + 'test-mu-msg.cc', + install: false, + dependencies: [glib_dep, lib_mu_dep, lib_test_mu_common_dep])) +test('test_store', + executable('test-store', + 'test-mu-store.cc', + install: false, + dependencies: [glib_dep, lib_mu_dep, lib_test_mu_common_dep])) +test('test_query', + executable('test-query', + 'test-query.cc', + install: false, + dependencies: [glib_dep, lib_mu_dep, lib_test_mu_common_dep])) +test('test_flags', + executable('test-flags', + 'test-mu-flags.cc', + install: false, + dependencies: [glib_dep, lib_mu_dep, lib_test_mu_common_dep])) + +test('test_tokenizer', + executable('test-tokenizer', + 'test-tokenizer.cc', + install: false, + dependencies: [glib_dep, lib_mu_dep, lib_test_mu_common_dep])) +test('test_threads', + executable('test-threads', + '../mu-query-threads.cc', + install: false, + cpp_args: ['-DBUILD_TESTS'], + dependencies: [glib_dep, lib_mu_dep, lib_test_mu_common_dep])) +test('test_contacts', + executable('test-contacts', + '../mu-contacts.cc', + install: false, + cpp_args: ['-DBUILD_TESTS'], + dependencies: [glib_dep, lib_mu_dep, lib_test_mu_common_dep])) +test('test_parser', + executable('test-parser', + 'test-parser.cc', + install: false, + dependencies: [glib_dep, lib_mu_dep, lib_test_mu_common_dep])) diff --git a/lib/test-indexer.cc b/lib/tests/test-indexer.cc similarity index 100% rename from lib/test-indexer.cc rename to lib/tests/test-indexer.cc diff --git a/lib/test-mu-common.cc b/lib/tests/test-mu-common.cc similarity index 100% rename from lib/test-mu-common.cc rename to lib/tests/test-mu-common.cc diff --git a/lib/test-mu-common.hh b/lib/tests/test-mu-common.hh similarity index 100% rename from lib/test-mu-common.hh rename to lib/tests/test-mu-common.hh diff --git a/lib/test-mu-container.cc b/lib/tests/test-mu-container.cc similarity index 100% rename from lib/test-mu-container.cc rename to lib/tests/test-mu-container.cc diff --git a/lib/test-mu-flags.cc b/lib/tests/test-mu-flags.cc similarity index 100% rename from lib/test-mu-flags.cc rename to lib/tests/test-mu-flags.cc diff --git a/lib/test-mu-maildir.cc b/lib/tests/test-mu-maildir.cc similarity index 100% rename from lib/test-mu-maildir.cc rename to lib/tests/test-mu-maildir.cc diff --git a/lib/test-mu-msg-fields.cc b/lib/tests/test-mu-msg-fields.cc similarity index 100% rename from lib/test-mu-msg-fields.cc rename to lib/tests/test-mu-msg-fields.cc diff --git a/lib/test-mu-msg.cc b/lib/tests/test-mu-msg.cc similarity index 100% rename from lib/test-mu-msg.cc rename to lib/tests/test-mu-msg.cc diff --git a/lib/test-mu-store.cc b/lib/tests/test-mu-store.cc similarity index 100% rename from lib/test-mu-store.cc rename to lib/tests/test-mu-store.cc diff --git a/lib/test-parser.cc b/lib/tests/test-parser.cc similarity index 100% rename from lib/test-parser.cc rename to lib/tests/test-parser.cc diff --git a/lib/test-query.cc b/lib/tests/test-query.cc similarity index 100% rename from lib/test-query.cc rename to lib/tests/test-query.cc diff --git a/lib/test-tokenizer.cc b/lib/tests/test-tokenizer.cc similarity index 100% rename from lib/test-tokenizer.cc rename to lib/tests/test-tokenizer.cc diff --git a/lib/testdir/cur/1220863042.12663_1.mindcrime!2,S b/lib/tests/testdir/cur/1220863042.12663_1.mindcrime!2,S similarity index 100% rename from lib/testdir/cur/1220863042.12663_1.mindcrime!2,S rename to lib/tests/testdir/cur/1220863042.12663_1.mindcrime!2,S diff --git a/lib/testdir/cur/1220863060.12663_3.mindcrime!2,S b/lib/tests/testdir/cur/1220863060.12663_3.mindcrime!2,S similarity index 100% rename from lib/testdir/cur/1220863060.12663_3.mindcrime!2,S rename to lib/tests/testdir/cur/1220863060.12663_3.mindcrime!2,S diff --git a/lib/testdir/cur/1220863087.12663_15.mindcrime!2,PS b/lib/tests/testdir/cur/1220863087.12663_15.mindcrime!2,PS similarity index 100% rename from lib/testdir/cur/1220863087.12663_15.mindcrime!2,PS rename to lib/tests/testdir/cur/1220863087.12663_15.mindcrime!2,PS diff --git a/lib/testdir/cur/1220863087.12663_19.mindcrime!2,S b/lib/tests/testdir/cur/1220863087.12663_19.mindcrime!2,S similarity index 100% rename from lib/testdir/cur/1220863087.12663_19.mindcrime!2,S rename to lib/tests/testdir/cur/1220863087.12663_19.mindcrime!2,S diff --git a/lib/testdir/cur/1220863087.12663_5.mindcrime!2,S b/lib/tests/testdir/cur/1220863087.12663_5.mindcrime!2,S similarity index 100% rename from lib/testdir/cur/1220863087.12663_5.mindcrime!2,S rename to lib/tests/testdir/cur/1220863087.12663_5.mindcrime!2,S diff --git a/lib/testdir/cur/1220863087.12663_7.mindcrime!2,RS b/lib/tests/testdir/cur/1220863087.12663_7.mindcrime!2,RS similarity index 100% rename from lib/testdir/cur/1220863087.12663_7.mindcrime!2,RS rename to lib/tests/testdir/cur/1220863087.12663_7.mindcrime!2,RS diff --git a/lib/testdir/cur/1252168370_3.14675.cthulhu!2,S b/lib/tests/testdir/cur/1252168370_3.14675.cthulhu!2,S similarity index 100% rename from lib/testdir/cur/1252168370_3.14675.cthulhu!2,S rename to lib/tests/testdir/cur/1252168370_3.14675.cthulhu!2,S diff --git a/lib/testdir/cur/1283599333.1840_11.cthulhu!2, b/lib/tests/testdir/cur/1283599333.1840_11.cthulhu!2, similarity index 100% rename from lib/testdir/cur/1283599333.1840_11.cthulhu!2, rename to lib/tests/testdir/cur/1283599333.1840_11.cthulhu!2, diff --git a/lib/testdir/cur/1305664394.2171_402.cthulhu!2, b/lib/tests/testdir/cur/1305664394.2171_402.cthulhu!2, similarity index 100% rename from lib/testdir/cur/1305664394.2171_402.cthulhu!2, rename to lib/tests/testdir/cur/1305664394.2171_402.cthulhu!2, diff --git a/lib/testdir/cur/encrypted!2,S b/lib/tests/testdir/cur/encrypted!2,S similarity index 100% rename from lib/testdir/cur/encrypted!2,S rename to lib/tests/testdir/cur/encrypted!2,S diff --git a/lib/testdir/cur/multimime!2,FS b/lib/tests/testdir/cur/multimime!2,FS similarity index 100% rename from lib/testdir/cur/multimime!2,FS rename to lib/tests/testdir/cur/multimime!2,FS diff --git a/lib/testdir/cur/multirecip!2,S b/lib/tests/testdir/cur/multirecip!2,S similarity index 100% rename from lib/testdir/cur/multirecip!2,S rename to lib/tests/testdir/cur/multirecip!2,S diff --git a/lib/testdir/cur/signed!2,S b/lib/tests/testdir/cur/signed!2,S similarity index 100% rename from lib/testdir/cur/signed!2,S rename to lib/tests/testdir/cur/signed!2,S diff --git a/lib/testdir/cur/signed-encrypted!2,S b/lib/tests/testdir/cur/signed-encrypted!2,S similarity index 100% rename from lib/testdir/cur/signed-encrypted!2,S rename to lib/tests/testdir/cur/signed-encrypted!2,S diff --git a/lib/testdir/cur/special!2,Sabc b/lib/tests/testdir/cur/special!2,Sabc similarity index 100% rename from lib/testdir/cur/special!2,Sabc rename to lib/tests/testdir/cur/special!2,Sabc diff --git a/lib/testdir/new/1220863087.12663_21.mindcrime b/lib/tests/testdir/new/1220863087.12663_21.mindcrime similarity index 100% rename from lib/testdir/new/1220863087.12663_21.mindcrime rename to lib/tests/testdir/new/1220863087.12663_21.mindcrime diff --git a/lib/testdir/new/1220863087.12663_23.mindcrime b/lib/tests/testdir/new/1220863087.12663_23.mindcrime similarity index 100% rename from lib/testdir/new/1220863087.12663_23.mindcrime rename to lib/tests/testdir/new/1220863087.12663_23.mindcrime diff --git a/lib/testdir/new/1220863087.12663_25.mindcrime b/lib/tests/testdir/new/1220863087.12663_25.mindcrime similarity index 100% rename from lib/testdir/new/1220863087.12663_25.mindcrime rename to lib/tests/testdir/new/1220863087.12663_25.mindcrime diff --git a/lib/testdir/new/1220863087.12663_9.mindcrime b/lib/tests/testdir/new/1220863087.12663_9.mindcrime similarity index 100% rename from lib/testdir/new/1220863087.12663_9.mindcrime rename to lib/tests/testdir/new/1220863087.12663_9.mindcrime diff --git a/lib/testdir/tmp/1220863087.12663.ignore b/lib/tests/testdir/tmp/1220863087.12663.ignore similarity index 100% rename from lib/testdir/tmp/1220863087.12663.ignore rename to lib/tests/testdir/tmp/1220863087.12663.ignore diff --git a/lib/testdir2/Foo/cur/arto.eml b/lib/tests/testdir2/Foo/cur/arto.eml similarity index 100% rename from lib/testdir2/Foo/cur/arto.eml rename to lib/tests/testdir2/Foo/cur/arto.eml diff --git a/lib/testdir2/Foo/cur/fraiche.eml b/lib/tests/testdir2/Foo/cur/fraiche.eml similarity index 100% rename from lib/testdir2/Foo/cur/fraiche.eml rename to lib/tests/testdir2/Foo/cur/fraiche.eml diff --git a/lib/testdir2/Foo/cur/mail5 b/lib/tests/testdir2/Foo/cur/mail5 similarity index 100% rename from lib/testdir2/Foo/cur/mail5 rename to lib/tests/testdir2/Foo/cur/mail5 diff --git a/lib/testdir2/Foo/new/.noindex b/lib/tests/testdir2/Foo/new/.noindex similarity index 100% rename from lib/testdir2/Foo/new/.noindex rename to lib/tests/testdir2/Foo/new/.noindex diff --git a/lib/testdir2/Foo/tmp/.noindex b/lib/tests/testdir2/Foo/tmp/.noindex similarity index 100% rename from lib/testdir2/Foo/tmp/.noindex rename to lib/tests/testdir2/Foo/tmp/.noindex diff --git a/lib/testdir2/bar/cur/181736.eml b/lib/tests/testdir2/bar/cur/181736.eml similarity index 100% rename from lib/testdir2/bar/cur/181736.eml rename to lib/tests/testdir2/bar/cur/181736.eml diff --git a/lib/testdir2/bar/cur/mail1 b/lib/tests/testdir2/bar/cur/mail1 similarity index 100% rename from lib/testdir2/bar/cur/mail1 rename to lib/tests/testdir2/bar/cur/mail1 diff --git a/lib/testdir2/bar/cur/mail2 b/lib/tests/testdir2/bar/cur/mail2 similarity index 100% rename from lib/testdir2/bar/cur/mail2 rename to lib/tests/testdir2/bar/cur/mail2 diff --git a/lib/testdir2/bar/cur/mail3 b/lib/tests/testdir2/bar/cur/mail3 similarity index 100% rename from lib/testdir2/bar/cur/mail3 rename to lib/tests/testdir2/bar/cur/mail3 diff --git a/lib/testdir2/bar/cur/mail4 b/lib/tests/testdir2/bar/cur/mail4 similarity index 100% rename from lib/testdir2/bar/cur/mail4 rename to lib/tests/testdir2/bar/cur/mail4 diff --git a/lib/testdir2/bar/cur/mail5 b/lib/tests/testdir2/bar/cur/mail5 similarity index 100% rename from lib/testdir2/bar/cur/mail5 rename to lib/tests/testdir2/bar/cur/mail5 diff --git a/lib/testdir2/bar/cur/mail6 b/lib/tests/testdir2/bar/cur/mail6 similarity index 100% rename from lib/testdir2/bar/cur/mail6 rename to lib/tests/testdir2/bar/cur/mail6 diff --git a/lib/testdir2/bar/new/.noindex b/lib/tests/testdir2/bar/new/.noindex similarity index 100% rename from lib/testdir2/bar/new/.noindex rename to lib/tests/testdir2/bar/new/.noindex diff --git a/lib/testdir2/bar/tmp/.noindex b/lib/tests/testdir2/bar/tmp/.noindex similarity index 100% rename from lib/testdir2/bar/tmp/.noindex rename to lib/tests/testdir2/bar/tmp/.noindex diff --git a/lib/testdir2/wom_bat/cur/atomic b/lib/tests/testdir2/wom_bat/cur/atomic similarity index 100% rename from lib/testdir2/wom_bat/cur/atomic rename to lib/tests/testdir2/wom_bat/cur/atomic diff --git a/lib/testdir2/wom_bat/cur/rfc822.1 b/lib/tests/testdir2/wom_bat/cur/rfc822.1 similarity index 100% rename from lib/testdir2/wom_bat/cur/rfc822.1 rename to lib/tests/testdir2/wom_bat/cur/rfc822.1 diff --git a/lib/testdir2/wom_bat/cur/rfc822.2 b/lib/tests/testdir2/wom_bat/cur/rfc822.2 similarity index 100% rename from lib/testdir2/wom_bat/cur/rfc822.2 rename to lib/tests/testdir2/wom_bat/cur/rfc822.2 diff --git a/lib/testdir4/1220863042.12663_1.mindcrime!2,S b/lib/tests/testdir4/1220863042.12663_1.mindcrime!2,S similarity index 100% rename from lib/testdir4/1220863042.12663_1.mindcrime!2,S rename to lib/tests/testdir4/1220863042.12663_1.mindcrime!2,S diff --git a/lib/testdir4/1220863087.12663_19.mindcrime!2,S b/lib/tests/testdir4/1220863087.12663_19.mindcrime!2,S similarity index 100% rename from lib/testdir4/1220863087.12663_19.mindcrime!2,S rename to lib/tests/testdir4/1220863087.12663_19.mindcrime!2,S diff --git a/lib/testdir4/1252168370_3.14675.cthulhu!2,S b/lib/tests/testdir4/1252168370_3.14675.cthulhu!2,S similarity index 100% rename from lib/testdir4/1252168370_3.14675.cthulhu!2,S rename to lib/tests/testdir4/1252168370_3.14675.cthulhu!2,S diff --git a/lib/testdir4/1283599333.1840_11.cthulhu!2, b/lib/tests/testdir4/1283599333.1840_11.cthulhu!2, similarity index 100% rename from lib/testdir4/1283599333.1840_11.cthulhu!2, rename to lib/tests/testdir4/1283599333.1840_11.cthulhu!2, diff --git a/lib/testdir4/1305664394.2171_402.cthulhu!2, b/lib/tests/testdir4/1305664394.2171_402.cthulhu!2, similarity index 100% rename from lib/testdir4/1305664394.2171_402.cthulhu!2, rename to lib/tests/testdir4/1305664394.2171_402.cthulhu!2, diff --git a/lib/testdir4/181736.eml b/lib/tests/testdir4/181736.eml similarity index 100% rename from lib/testdir4/181736.eml rename to lib/tests/testdir4/181736.eml diff --git a/lib/testdir4/encrypted!2,S b/lib/tests/testdir4/encrypted!2,S similarity index 100% rename from lib/testdir4/encrypted!2,S rename to lib/tests/testdir4/encrypted!2,S diff --git a/lib/testdir4/mail1 b/lib/tests/testdir4/mail1 similarity index 100% rename from lib/testdir4/mail1 rename to lib/tests/testdir4/mail1 diff --git a/lib/testdir4/mail5 b/lib/tests/testdir4/mail5 similarity index 100% rename from lib/testdir4/mail5 rename to lib/tests/testdir4/mail5 diff --git a/lib/testdir4/multimime!2,FS b/lib/tests/testdir4/multimime!2,FS similarity index 100% rename from lib/testdir4/multimime!2,FS rename to lib/tests/testdir4/multimime!2,FS diff --git a/lib/testdir4/signed!2,S b/lib/tests/testdir4/signed!2,S similarity index 100% rename from lib/testdir4/signed!2,S rename to lib/tests/testdir4/signed!2,S diff --git a/lib/testdir4/signed-bad!2,S b/lib/tests/testdir4/signed-bad!2,S similarity index 100% rename from lib/testdir4/signed-bad!2,S rename to lib/tests/testdir4/signed-bad!2,S diff --git a/lib/testdir4/signed-encrypted!2,S b/lib/tests/testdir4/signed-encrypted!2,S similarity index 100% rename from lib/testdir4/signed-encrypted!2,S rename to lib/tests/testdir4/signed-encrypted!2,S diff --git a/lib/testdir4/special!2,Sabc b/lib/tests/testdir4/special!2,Sabc similarity index 100% rename from lib/testdir4/special!2,Sabc rename to lib/tests/testdir4/special!2,Sabc diff --git a/lib/utils/Makefile.am b/lib/utils/Makefile.am index 4ac835bf..834fdae8 100644 --- a/lib/utils/Makefile.am +++ b/lib/utils/Makefile.am @@ -79,52 +79,4 @@ libmu_utils_la_LIBADD= \ $(READLINE_LIBS) \ $(CODE_COVERAGE_LIBS) -noinst_PROGRAMS= \ - $(TEST_PROGS) - -TEST_PROGS+= \ - test-mu-util -test_mu_util_SOURCES= \ - test-mu-util.c -test_mu_util_LDADD= \ - libmu-utils.la - -TEST_PROGS+= \ - test-mu-utils -test_mu_utils_SOURCES= \ - test-utils.cc -test_mu_utils_LDADD= \ - libmu-utils.la - -TEST_PROGS+= \ - test-mu-str -test_mu_str_SOURCES= \ - test-mu-str.c -test_mu_str_LDADD= \ - libmu-utils.la - -TEST_PROGS+= \ - test-sexp -test_sexp_SOURCES= \ - test-sexp.cc -test_sexp_LDADD= \ - libmu-utils.la - -TEST_PROGS+= \ - test-command-parser -test_command_parser_SOURCES= \ - test-command-parser.cc -test_command_parser_LDADD= \ - libmu-utils.la - -TEST_PROGS+= \ - test-option -test_option_SOURCES= \ - test-option.cc -test_option_LDADD= \ - libmu-utils.la - - -TESTS=$(TEST_PROGS) - include $(top_srcdir)/aminclude_static.am diff --git a/lib/utils/meson.build b/lib/utils/meson.build index d2b28752..8c71e6e2 100644 --- a/lib/utils/meson.build +++ b/lib/utils/meson.build @@ -53,41 +53,4 @@ lib_mu_utils_dep = declare_dependency( include_directories: include_directories(['.', '..']) ) - -################################################################################ -# tests -# -testmaildir=join_paths(meson.current_source_dir(),'..') - -test('test_command_parser', - executable('test-command-parser', - 'test-command-parser.cc', - install: false, - dependencies: [glib_dep, lib_mu_utils_dep])) -test('test_mu_str', - executable('test-mu-str', - 'test-mu-str.c', - install: false, - dependencies: [glib_dep, config_h_dep,lib_mu_utils_dep])) -test('test_mu_util', - executable('test-mu-util', - 'test-mu-util.c', - install: false, - dependencies: [glib_dep,config_h_dep, lib_mu_utils_dep], - c_args: ['-DMU_TESTMAILDIR="' + join_paths(testmaildir, 'testdir') + '"', - '-DMU_TESTMAILDIR2="' + join_paths(testmaildir, 'testdir2') + '"'])) -test('test_option', - executable('test-option', - 'test-option.cc', - install: false, - dependencies: [glib_dep, lib_mu_utils_dep])) -test('test_mu_utils', - executable('test-mu-utils', - 'test-utils.cc', - install: false, - dependencies: [glib_dep, lib_mu_utils_dep])) -test('test_sexp', - executable('test-sexp', - 'test-sexp.cc', - install: false, - dependencies: [glib_dep, lib_mu_utils_dep] )) +subdir('tests') diff --git a/lib/utils/tests/meson.build b/lib/utils/tests/meson.build new file mode 100644 index 00000000..bee353c6 --- /dev/null +++ b/lib/utils/tests/meson.build @@ -0,0 +1,50 @@ +## Copyright (C) 2021 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 of the License, or +## (at your option) any later version. +## +## This program is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with this program; if not, write to the Free Software Foundation, +## Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + + +################################################################################ +# tests +# +test('test_command_parser', + executable('test-command-parser', + 'test-command-parser.cc', + install: false, + dependencies: [glib_dep, lib_mu_utils_dep])) +test('test_mu_str', + executable('test-mu-str', + 'test-mu-str.c', + install: false, + dependencies: [glib_dep, config_h_dep,lib_mu_utils_dep])) +test('test_mu_util', + executable('test-mu-util', + 'test-mu-util.c', + install: false, + dependencies: [glib_dep,config_h_dep, lib_mu_utils_dep])) +test('test_option', + executable('test-option', + 'test-option.cc', + install: false, + dependencies: [glib_dep, lib_mu_utils_dep])) +test('test_mu_utils', + executable('test-mu-utils', + 'test-utils.cc', + install: false, + dependencies: [glib_dep, lib_mu_utils_dep])) +test('test_sexp', + executable('test-sexp', + 'test-sexp.cc', + install: false, + dependencies: [glib_dep, lib_mu_utils_dep] )) diff --git a/lib/utils/test-command-parser.cc b/lib/utils/tests/test-command-parser.cc similarity index 100% rename from lib/utils/test-command-parser.cc rename to lib/utils/tests/test-command-parser.cc diff --git a/lib/utils/test-mu-str.c b/lib/utils/tests/test-mu-str.c similarity index 100% rename from lib/utils/test-mu-str.c rename to lib/utils/tests/test-mu-str.c diff --git a/lib/utils/test-mu-util.c b/lib/utils/tests/test-mu-util.c similarity index 100% rename from lib/utils/test-mu-util.c rename to lib/utils/tests/test-mu-util.c diff --git a/lib/utils/test-option.cc b/lib/utils/tests/test-option.cc similarity index 100% rename from lib/utils/test-option.cc rename to lib/utils/tests/test-option.cc diff --git a/lib/utils/test-sexp.cc b/lib/utils/tests/test-sexp.cc similarity index 100% rename from lib/utils/test-sexp.cc rename to lib/utils/tests/test-sexp.cc diff --git a/lib/utils/test-utils.cc b/lib/utils/tests/test-utils.cc similarity index 100% rename from lib/utils/test-utils.cc rename to lib/utils/tests/test-utils.cc diff --git a/meson.build b/meson.build index b71e5dca..fcb5ad57 100644 --- a/meson.build +++ b/meson.build @@ -66,7 +66,6 @@ foreach extra_arg : extra_flags endforeach - ################################################################################ # config.h setup # @@ -97,6 +96,10 @@ if cc.has_function('wordexp') config_h_data.set('HAVE_WORDEXP_H',1) endif +testmaildir=join_paths(meson.current_source_dir(), 'lib', 'tests') +config_h_data.set_quoted('MU_TESTMAILDIR', join_paths(testmaildir, 'testdir')) +config_h_data.set_quoted('MU_TESTMAILDIR2', join_paths(testmaildir, 'testdir2')) +config_h_data.set_quoted('MU_TESTMAILDIR4', join_paths(testmaildir, 'testdir4')) ################################################################################ # hard dependencies @@ -157,8 +160,6 @@ configure_file(input: 'version.texi.in', output: 'version.texi', configuration: version_texi_data) - - ################################################################################ # install some data files install_data('NEWS.org', @@ -176,10 +177,13 @@ endif if not get_option('guile').disabled() and guile_dep.found() config_h_data.set('BUILD_GUILE', 1) - config_h_data.set('GUILE_BINARY', '"guile"') + config_h_data.set_quoted('GUILE_BINARY', 'guile') subdir('guile') endif +config_h_data.set_quoted('MU_PROGRAM', mu.full_path()) + + if get_option('toys').enabled() subdir('toys/mug') endif diff --git a/mu/Makefile.am b/mu/Makefile.am index 902cb2eb..f7959135 100644 --- a/mu/Makefile.am +++ b/mu/Makefile.am @@ -68,38 +68,5 @@ EXTRA_DIST= \ mu-help-strings.awk \ mu-help-strings.txt -# -# Tests -# - -noinst_PROGRAMS= $(TEST_PROGS) - -test_cxxflags= \ - ${AM_CXXFLAGS} \ - -DMU_TESTMAILDIR=\"${abs_top_srcdir}/lib/testdir\" \ - -DMU_TESTMAILDIR2=\"${abs_top_srcdir}/lib/testdir2\" \ - -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-query -test_query_SOURCES= tests/test-mu-query.cc -test_query_CXXFLAGS=$(test_cxxflags) -test_query_LDADD=${top_builddir}/lib/libtestmucommon.la $(CODE_COVERAGE_LIBS) - -TEST_PROGS += test-cmd -test_cmd_SOURCES= tests/test-mu-cmd.cc -test_cmd_CXXFLAGS=$(test_cxxflags) -test_cmd_LDADD=${top_builddir}/lib/libtestmucommon.la $(CODE_COVERAGE_LIBS) - -TEST_PROGS += test-cmd-cfind -test_cmd_cfind_SOURCES= tests/test-mu-cmd-cfind.cc -test_cmd_cfind_CXXFLAGS=$(test_cxxflags) -test_cmd_cfind_LDADD=${top_builddir}/lib/libtestmucommon.la $(CODE_COVERAGE_LIBS) - -TESTS=$(TEST_PROGS) -include $(top_srcdir)/aminclude_static.am - CLEANFILES= \ $(BUILT_SOURCES) diff --git a/mu/meson.build b/mu/meson.build index 2d451293..7daf9239 100644 --- a/mu/meson.build +++ b/mu/meson.build @@ -14,7 +14,6 @@ ## along with this program; if not, write to the Free Software Foundation, ## Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - awk_script=join_paths(meson.current_source_dir(), 'mu-help-strings.awk') mu_help_strings_h=custom_target('mu_help', input: 'mu-help-strings.txt', @@ -40,42 +39,4 @@ mu = executable( cpp_args: ['-DMU_SCRIPTS_DIR="'+ join_paths(datadir, 'mu', 'scripts') + '"'], install: true) -# -# tests -# - -mu_binary = mu.full_path() -testmaildir=join_paths(meson.current_source_dir(),'../lib') - -test('test_cmd', - executable('test-cmd', - 'tests/test-mu-cmd.cc', - install: false, - cpp_args: ['-DMU_PROGRAM="' + mu_binary + '"', - '-DMU_TESTMAILDIR2="'+ join_paths(testmaildir, 'testdir2') + '"', - '-DMU_TESTMAILDIR4="'+ join_paths(testmaildir, 'testdir4') + '"'], - dependencies: [glib_dep, lib_test_mu_common_dep, config_h_dep, lib_mu_dep])) -test('test_cmd_cfind', - executable('test-cmd-cfind', - 'tests/test-mu-cmd-cfind.cc', - install: false, - cpp_args: ['-DMU_PROGRAM="' + mu_binary + '"', - '-DMU_TESTMAILDIR="'+ join_paths(testmaildir, 'testdir') + '"', - ], - dependencies: [glib_dep, lib_test_mu_common_dep, config_h_dep, lib_mu_dep])) -test('test_cmd_query', - executable('test-cmd-query', - 'tests/test-mu-query.cc', - install: false, - cpp_args: ['-DMU_PROGRAM="' + mu_binary + '"', - '-DMU_TESTMAILDIR="'+ join_paths(testmaildir, 'testdir') + '"', - '-DMU_TESTMAILDIR2="'+ join_paths(testmaildir, 'testdir2') + '"' - ], - dependencies: [glib_dep, lib_test_mu_common_dep, config_h_dep, lib_mu_dep])) - -gmime_test = executable( - 'gmime-test', [ - 'tests/gmime-test.c' -], - dependencies: [ glib_dep, gmime_dep ], - install: false) +subdir('tests') diff --git a/mu/tests/meson.build b/mu/tests/meson.build new file mode 100644 index 00000000..c4380c78 --- /dev/null +++ b/mu/tests/meson.build @@ -0,0 +1,41 @@ +## Copyright (C) 2021 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 of the License, or +## (at your option) any later version. +## +## This program is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with this program; if not, write to the Free Software Foundation, +## Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +# +# tests +# +test('test_cmd', + executable('test-cmd', + 'test-mu-cmd.cc', + install: false, + dependencies: [glib_dep, lib_test_mu_common_dep, config_h_dep, lib_mu_dep])) +test('test_cmd_cfind', + executable('test-cmd-cfind', + 'test-mu-cmd-cfind.cc', + install: false, + dependencies: [glib_dep, lib_test_mu_common_dep, config_h_dep, lib_mu_dep])) +test('test_cmd_query', + executable('test-cmd-query', + 'test-mu-query.cc', + install: false, + dependencies: [glib_dep, lib_test_mu_common_dep, config_h_dep, lib_mu_dep])) + +gmime_test = executable( + 'gmime-test', [ + 'gmime-test.c' +], + dependencies: [ glib_dep, gmime_dep ], + install: false)