diff options
author | bertrand <Bertrand.Guiheneuf@aful.org> | 1999-08-06 22:41:10 +0800 |
---|---|---|
committer | Bertrand Guiheneuf <bertrand@src.gnome.org> | 1999-08-06 22:41:10 +0800 |
commit | 9addfb95be696605fff7a292e8a81646b838d476 (patch) | |
tree | a71da9b1be96c3fc208e740bfab6f2905dc1fe13 | |
parent | 2bbd6e4180c90540f5be5c87736099229d234d60 (diff) | |
download | gsoc2013-evolution-9addfb95be696605fff7a292e8a81646b838d476.tar.gz gsoc2013-evolution-9addfb95be696605fff7a292e8a81646b838d476.tar.zst gsoc2013-evolution-9addfb95be696605fff7a292e8a81646b838d476.zip |
added real test for MH folder provider. All tested things seem to work OK
1999-08-06 bertrand <Bertrand.Guiheneuf@aful.org>
* tests/test4.c (main): added real test for MH folder
provider. All tested things seem to work OK :)
svn path=/trunk/; revision=1089
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | tests/test4.c | 26 |
2 files changed, 25 insertions, 6 deletions
@@ -1,3 +1,8 @@ +1999-08-06 bertrand <Bertrand.Guiheneuf@aful.org> + + * tests/test4.c (main): added real test for MH folder + provider. All tested things seem to work OK :) + 1998-08-06 Robert Brady <rwb197@ecs.soton.ac.uk> * tests/test5.c: test for RFC2047 decoder. diff --git a/tests/test4.c b/tests/test4.c index 79bd209b2e..bd333974a0 100644 --- a/tests/test4.c +++ b/tests/test4.c @@ -19,7 +19,7 @@ main (int argc, char**argv) CamelFolder *inbox_folder; CamelFolder *root_mh_folder; GList *mh_subfolders_name; - GtkObject *object; + CamelMimeMessage *message_1; gboolean inbox_exists; camel_debug_level = CAMEL_LOG_LEVEL_FULL_DEBUG; @@ -31,6 +31,16 @@ main (int argc, char**argv) store = gtk_type_new (CAMEL_MH_STORE_TYPE); camel_store_init (store, (CamelSession *)NULL, g_strdup ("mh:///root/Mail")); + root_mh_folder = camel_store_get_folder (store, ""); + mh_subfolders_name = camel_folder_list_subfolders (root_mh_folder); + + printf ("\n------------- Listing root Mh folder subfolders --------\n"); + while (mh_subfolders_name) { + printf ("\t\"%s\"\n", mh_subfolders_name->data); + mh_subfolders_name = mh_subfolders_name->next; + } + printf ("--------------------------------------------------------\n\n"); + inbox_folder = camel_store_get_folder (store, "inbox"); if (!inbox_folder) { printf ("** Error: could not get inbox folder from store\n"); @@ -40,15 +50,19 @@ main (int argc, char**argv) /* 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"); + printf ("MH folder inbox exists, continuing tests\n"); + else { + printf ("MH folder inbox does not exist. Stopping \n"); + return; + } + + printf ("\n------------- Gettting message numer 1 in inbox --------\n"); + message_1 = camel_folder_get_message (inbox_folder, 1); + printf ("--------------------------------------------------------\n\n"); - root_mh_folder = camel_store_get_folder (store, ""); - mh_subfolders_name = camel_folder_list_subfolders (root_mh_folder); } |