X-Git-Url: http://git.maemo.org/git/?p=modest;a=blobdiff_plain;f=tests%2Fcheck_modest-conf.c;h=668a1469658922ad472d155c9fd48859ff316851;hp=45786a3ecd2a64f9027b07b11bf3a7c5ea9f8357;hb=4306fe319d2e238ee2f99bc1420623b25b1dfdd6;hpb=cb68944c4c0c8e36453b07926bca8ebee668aa7b diff --git a/tests/check_modest-conf.c b/tests/check_modest-conf.c index 45786a3..668a146 100644 --- a/tests/check_modest-conf.c +++ b/tests/check_modest-conf.c @@ -30,7 +30,21 @@ #include #include #include +#include #include +#include + +static void +fx_setup_modest_conf () +{ + fail_unless (gtk_init_check (NULL, NULL)); + + fail_unless (g_setenv (MODEST_DIR_ENV, ".modesttest", TRUE)); + fail_unless (g_setenv (MODEST_NAMESPACE_ENV, "/apps/modesttest", TRUE)); + + fail_unless (modest_init (0, NULL), "Failed running modest_init"); + +} START_TEST (test_modest_conf_new) { @@ -160,6 +174,9 @@ modest_conf_suite (void) Suite *suite = suite_create ("ModestConf"); TCase *tc_core = tcase_create ("core"); + tcase_add_checked_fixture (tc_core, + fx_setup_modest_conf, + NULL); tcase_add_test (tc_core, test_modest_conf_new); tcase_add_test (tc_core, test_modest_conf_store_retrieve_string); tcase_add_test (tc_core, test_modest_conf_store_retrieve_bool);