diff options
| author | Dirk-Jan C. Binnema <djcb@djcbsoftware.nl> | 2021-01-27 18:57:33 +0200 |
|---|---|---|
| committer | Dirk-Jan C. Binnema <djcb@djcbsoftware.nl> | 2021-01-27 18:57:33 +0200 |
| commit | 7db2e527a8501f0e1d3768027582642bb920017d (patch) | |
| tree | ff86ab929e47027f29bf6a0cb77bfbd66b7c5cf7 /mu | |
| parent | 7f70149c95a4b848e464390477fb557eb231e2fd (diff) | |
mu: remove dead test-mu-runtime
Diffstat (limited to 'mu')
| -rw-r--r-- | mu/test-mu-runtime.cc | 98 |
1 files changed, 0 insertions, 98 deletions
diff --git a/mu/test-mu-runtime.cc b/mu/test-mu-runtime.cc deleted file mode 100644 index b48e03e..0000000 --- a/mu/test-mu-runtime.cc +++ /dev/null @@ -1,98 +0,0 @@ -/* -** Copyright (C) 2008-2013 Dirk-Jan C. Binnema <djcb@djcbsoftware.nl> -** -** 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 <glib.h> -#include <stdlib.h> -#include <unistd.h> -#include <time.h> - -#include <locale.h> - -#include "test-mu-common.h" -#include "src/mu-runtime.h" - -static void -test_mu_runtime_init (void) -{ - gchar* tmpdir; - - tmpdir = test_mu_common_get_random_tmpdir(); - g_assert (tmpdir); - g_assert (mu_runtime_init (tmpdir, "test-mu-runtime") == TRUE); - mu_runtime_uninit (); - - g_assert (mu_runtime_init (tmpdir, "test-mu-runtime") == TRUE); - mu_runtime_uninit (); - - g_free (tmpdir); -} - - -static void -test_mu_runtime_data (void) -{ - gchar *homedir, *xdir, *bmfile; - - homedir = test_mu_common_get_random_tmpdir(); - g_assert (homedir); - - xdir = g_strdup_printf ("%s%c%s", homedir, - G_DIR_SEPARATOR, "xapian" ); - - bmfile = g_strdup_printf ("%s%c%s", homedir, - G_DIR_SEPARATOR, "bookmarks"); - - g_assert (mu_runtime_init (homedir, "test-mu-runtime") == TRUE); - - g_assert_cmpstr (homedir, ==, mu_runtime_path (MU_RUNTIME_PATH_MUHOME)); - g_assert_cmpstr (xdir, ==, mu_runtime_path (MU_RUNTIME_PATH_XAPIANDB)); - g_assert_cmpstr (bmfile, ==, mu_runtime_path (MU_RUNTIME_PATH_BOOKMARKS)); - - mu_runtime_uninit (); - - g_free (homedir); - g_free (xdir); - g_free (bmfile); -} - - - -int -main (int argc, char *argv[]) -{ - g_test_init (&argc, &argv, NULL); - - /* mu_runtime_init/uninit */ - g_test_add_func ("/mu-runtime/mu-runtime-init", - test_mu_runtime_init); - g_test_add_func ("/mu-runtime/mu-runtime-data", - test_mu_runtime_data); - - 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 (); -} - - |
