diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2013-11-27 00:58:13 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2013-11-27 00:58:13 +0800 |
commit | 05c5d2998e6acd0216917ffd8bffe33ccfbc345c (patch) | |
tree | 233fa0ffc3e8d713b543e410bc5bbf4794a52568 /mail/test-mail-autoconfig.c | |
parent | 99120a0f18a24059004022c1a079e6fc31de3d2a (diff) | |
download | gsoc2013-evolution-05c5d2998e6acd0216917ffd8bffe33ccfbc345c.tar gsoc2013-evolution-05c5d2998e6acd0216917ffd8bffe33ccfbc345c.tar.gz gsoc2013-evolution-05c5d2998e6acd0216917ffd8bffe33ccfbc345c.tar.bz2 gsoc2013-evolution-05c5d2998e6acd0216917ffd8bffe33ccfbc345c.tar.lz gsoc2013-evolution-05c5d2998e6acd0216917ffd8bffe33ccfbc345c.tar.xz gsoc2013-evolution-05c5d2998e6acd0216917ffd8bffe33ccfbc345c.tar.zst gsoc2013-evolution-05c5d2998e6acd0216917ffd8bffe33ccfbc345c.zip |
EMailAutoconfig: Add an ESourceRegistry property.
Diffstat (limited to 'mail/test-mail-autoconfig.c')
-rw-r--r-- | mail/test-mail-autoconfig.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/mail/test-mail-autoconfig.c b/mail/test-mail-autoconfig.c index d6c431b8c9..252072bd84 100644 --- a/mail/test-mail-autoconfig.c +++ b/mail/test-mail-autoconfig.c @@ -17,6 +17,7 @@ */ #include <stdlib.h> +#include <libedataserver/libedataserver.h> #include "e-mail-autoconfig.h" @@ -24,6 +25,7 @@ gint main (gint argc, gchar **argv) { + ESourceRegistry *registry; EMailAutoconfig *autoconfig; GError *error = NULL; @@ -32,17 +34,25 @@ main (gint argc, exit (EXIT_FAILURE); } - autoconfig = e_mail_autoconfig_new_sync (argv[1], NULL, &error); + registry = e_source_registry_new_sync (NULL, &error); + + if (registry != NULL) { + autoconfig = e_mail_autoconfig_new_sync ( + registry, argv[1], NULL, &error); + g_object_unref (registry); + } + + /* Sanity check. */ + g_assert ( + ((autoconfig != NULL) && (error == NULL)) || + ((autoconfig == NULL) && (error != NULL))); if (error != NULL) { - g_warn_if_fail (autoconfig == NULL); g_printerr ("%s\n", error->message); g_error_free (error); exit (EXIT_FAILURE); } - g_assert (E_IS_MAIL_AUTOCONFIG (autoconfig)); - e_mail_autoconfig_dump_results (autoconfig); g_object_unref (autoconfig); |