2
** Copyright (C) 2008 Dirk-Jan C. Binnema <djcb@djcbsoftware.nl>
4
** This program is free software; you can redistribute it and/or modify it
5
** under the terms of the GNU General Public License as published by the
6
** Free Software Foundation; either version 3, or (at your option) any
9
** This program is distributed in the hope that it will be useful,
10
** but WITHOUT ANY WARRANTY; without even the implied warranty of
11
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
** GNU General Public License for more details.
14
** You should have received a copy of the GNU General Public License
15
** along with this program; if not, write to the Free Software Foundation,
16
** Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21
#include "app/mu-conf.h"
22
#include "app/mu-app.h"
24
/* make sure creating a maildir succeeds */
33
char *d[] = {"testmu"};
34
char **dummy = (char**)d;
37
g_assert (mu_app_init (&i, &dummy, "test-mu-conf"));
39
g_assert ((conf = mu_conf_new ("test.conf", "foo")));
42
g_assert (mu_conf_get_bool (conf, "somebool", &b));
45
g_assert (mu_conf_get_int (conf, "someint", &i));
48
g_assert (mu_conf_get_string (conf, "somestring", &s));
49
g_assert_cmpstr (s, ==, "hello world");
53
g_assert (!mu_conf_get_string (conf, "anotherstring", &s));
54
g_assert (!mu_conf_get_bool (conf, "anotherbool", &b));
56
mu_conf_destroy (conf);
61
main (int argc, char *argv[])
63
g_test_init (&argc, &argv, NULL);
64
g_test_add_func ("/mu/conf", test_mu_conf);