aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test4.c
diff options
context:
space:
mode:
authorbertrand <Bertrand.Guiheneuf@aful.org>1999-08-06 22:17:27 +0800
committerBertrand Guiheneuf <bertrand@src.gnome.org>1999-08-06 22:17:27 +0800
commitcf2f1c428f9a75323318f04c66c7e1999ad65f62 (patch)
tree163a19250bed8ec545c732f7966650a9fb74358d /tests/test4.c
parent9dba21ca8de2f437014086eb80a4197c53246ed1 (diff)
downloadgsoc2013-evolution-cf2f1c428f9a75323318f04c66c7e1999ad65f62.tar.gz
gsoc2013-evolution-cf2f1c428f9a75323318f04c66c7e1999ad65f62.tar.zst
gsoc2013-evolution-cf2f1c428f9a75323318f04c66c7e1999ad65f62.zip
add debug information (_list_subfolders): test if first char in folder
1999-08-06 bertrand <Bertrand.Guiheneuf@aful.org> * camel/providers/MH/camel-mh-folder.c (_exists): add debug information (_list_subfolders): test if first char in folder name is not '.' before adding it to the folder list. * camel/camel-store.c (_init): disable session check temporarily (_get_separator): (_get_folder): new static func. Fixed several oddities in class definition. * camel/providers/MH/camel-mh-store.c (camel_mh_store_get_type): parent type is CAMEL_STORE_TYPE not CAMEL_FOLDER_TYPE * camel/camel-store.c: prent class is CamelServiceClass not GtkObjectClass * camel/url-util.c : cosmetic changes + use of const when possible. (find_host): fix a bug: when there is no host and no port don't skip the '/' all static find_* func are now named _func_* (g_url_free): destructor func. cache field has been disabled. Constructing the url string won't be too slow and will occur rarely enough that we do not need to add complexity to this code. * camel/providers/MH/camel-mh-store.c: parent class is CamelStorClass not GtkObjectClass svn path=/trunk/; revision=1087
Diffstat (limited to 'tests/test4.c')
-rw-r--r--tests/test4.c39
1 files changed, 35 insertions, 4 deletions
diff --git a/tests/test4.c b/tests/test4.c
index a19a91a3c3..79bd209b2e 100644
--- a/tests/test4.c
+++ b/tests/test4.c
@@ -1,23 +1,54 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/* testing mh providers
- do not use CamelMhFolder directly.
+ do not use CamelMhFolder and CamelMhStore directly.
We do it here for test purpose only */
#include "camel-folder.h"
#include "camel-mh-folder.h"
+#include "camel-mh-store.h"
#include "camel.h"
+#include "camel-log.h"
int
main (int argc, char**argv)
{
- CamelFolder *folder;
+ CamelStore *store;
+ CamelFolder *inbox_folder;
+ CamelFolder *root_mh_folder;
+ GList *mh_subfolders_name;
+ GtkObject *object;
+ gboolean inbox_exists;
- /* folder = gtk_type_new (CAMEL_MH_FOLDER_TYPE); */
- /* nothing for the moment */
+ camel_debug_level = CAMEL_LOG_LEVEL_FULL_DEBUG;
+
+ gtk_init (&argc, &argv);
+ camel_init ();
+
+
+ store = gtk_type_new (CAMEL_MH_STORE_TYPE);
+ camel_store_init (store, (CamelSession *)NULL, g_strdup ("mh:///root/Mail"));
+
+ inbox_folder = camel_store_get_folder (store, "inbox");
+ if (!inbox_folder) {
+ printf ("** Error: could not get inbox folder from store\n");
+ return;
+ }
+ /* test existence */
+ inbox_exists = camel_folder_exists (inbox_folder);
+ if (inbox_exists)
+ printf ("MH folder inbox exists\n");
+ else
+ printf ("MH folder inbox does not exist\n");
+
+
+
+ root_mh_folder = camel_store_get_folder (store, "");
+ mh_subfolders_name = camel_folder_list_subfolders (root_mh_folder);
+
}
fc'>ports-mgmt/portfmt: Update to latest committobik2020-02-063-6/+8 * Fix variable substitution in pkg-message0mp2020-02-042-11/+14 * ports-mgmt/modules2tuple: Update to 1.15.0dmgk2020-02-022-4/+4 * Import the libfetch patch to the bundled libfetchbapt2020-01-292-0/+32 * Import the libfetch patch to the bundled libfetchbapt2020-01-292-0/+32 * Update to 1.22.99.4bapt2020-01-293-5/+8 * Save the file with instructions how to restart portmaster after a failurese2020-01-272-1/+16 * Make the pre-build "make clean" use SU_CMD if appropriate.se2020-01-273-1/+18 * Make portmaster fall back to other locations if invoked in, e.g., /sys/conf.se2020-01-272-1/+10 * Add option --try-brokense2020-01-273-62/+126 * Update to 1.12.99.3bapt2020-01-252-5/+5 * Do not re-build ports unneccessarilyse2020-01-232-54/+55 * update to 1.12.99.2bapt2020-01-232-4/+4 * Attempt to fix a problem that leads to repeated building of some portsse2020-01-222-54/+57 * Change my mail address to lbartoletti@FreeBSD.orglbartoletti2020-01-151-1/+1 * ports-mgmt/portfmt: Update to latest committobik2020-01-142-5/+5 * Update to version 1.09skreuzer2020-01-112-5/+4 * ports-mgmt/modules2tuple: Update to 1.14.0dmgk2020-01-042-4/+4 * Fix build when libncursesw will be removedbapt2019-12-281-0/+16 * Ensure building against the proper libncursesbapt2019-12-281-0/+4 * Update to 1.12.99.1bapt2019-12-242-5/+5 * ports-mgmt/modules2tuple: Update to 1.13.0dmgk2019-12-232-4/+4 * ports-mgmt/portal: fix build on GCC architecturespkubaj2019-12-231-3/+6 * Update to 0.8.1.4grembo2019-12-222-5/+4 * ports-mgmt/py-FreeBSD-ports: works OK with newer python tooswills2019-12-161-1/+1 * ports-mgmt/pkg-provides: Upgrade to 0.6.2rodrigo2019-12-162-5/+5 * ports-mgmt/portfmt: Update to latest committobik2019-12-153-15/+34 * New port: ports-mgmt/portgrepdmgk2019-12-114-0/+37 * - Update to 3.3.3bdrewery2019-12-112-5/+5 * - Update to 3.3.0-229-gce2011f23bdrewery2019-12-112-5/+5 * ports-mgmt/create-rb-port: fetches againswills2019-12-091-2/+0 * Update to 0.3.0sunpoet2019-12-093-4/+8 * - Update to 20191018amdmi32019-12-052-4/+4 * Upgrade ports/pkg-provides to v0.6.1rodrigo2019-11-29