From 01cbdc713fe66ddf9b2f82c1562c8edc526b81d4 Mon Sep 17 00:00:00 2001 From: nobody Date: Wed, 5 Dec 2001 04:54:00 +0000 Subject: This commit was manufactured by cvs2svn to create tag 'GPERFMETER_GNOME_1_4_1'. svn path=/tags/GPERFMETER_GNOME_1_4_1/; revision=14882 --- tests/.cvsignore | 24 - tests/Makefile.am | 73 - tests/test-movemail.c | 164 - tests/test-url.c | 37 - tests/test1.c | 136 - tests/test10.c | 127 - tests/test11.c | 136 - tests/test12.c | 56 - tests/test13.c | 123 - tests/test14.c | 177 - tests/test2.c | 48 - tests/test3.c | 29 - tests/test4.c | 65 - tests/test5.c | 59 - tests/test6.c | 49 - tests/test8.c | 75 - tests/test9.c | 80 - tests/ui-tests/.cvsignore | 8 - tests/ui-tests/Makefile.am | 39 - tests/ui-tests/filter.c | 30 - tests/ui-tests/filterdescription.xml | 99 - tests/ui-tests/mail-atchmt-image.msg | 67 - tests/ui-tests/mail-atchmt-postscript.msg | 8069 ------------- tests/ui-tests/mail-atchmt-svg.msg | 418 - tests/ui-tests/message-browser.c | 819 -- tests/ui-tests/saveoptions.xml | 37 - tests/ui-tests/store_listing.c | 424 - tests/ui-tests/store_listing.glade | 489 - tests/ui-tests/test-multipart-alt.msg | 17738 ---------------------------- tests/ui-tests/test-multipart-mixed.msg | 377 - 30 files changed, 30072 deletions(-) delete mode 100644 tests/.cvsignore delete mode 100644 tests/Makefile.am delete mode 100644 tests/test-movemail.c delete mode 100644 tests/test-url.c delete mode 100644 tests/test1.c delete mode 100644 tests/test10.c delete mode 100644 tests/test11.c delete mode 100644 tests/test12.c delete mode 100644 tests/test13.c delete mode 100644 tests/test14.c delete mode 100644 tests/test2.c delete mode 100644 tests/test3.c delete mode 100644 tests/test4.c delete mode 100644 tests/test5.c delete mode 100644 tests/test6.c delete mode 100644 tests/test8.c delete mode 100644 tests/test9.c delete mode 100644 tests/ui-tests/.cvsignore delete mode 100644 tests/ui-tests/Makefile.am delete mode 100644 tests/ui-tests/filter.c delete mode 100644 tests/ui-tests/filterdescription.xml delete mode 100644 tests/ui-tests/mail-atchmt-image.msg delete mode 100644 tests/ui-tests/mail-atchmt-postscript.msg delete mode 100644 tests/ui-tests/mail-atchmt-svg.msg delete mode 100644 tests/ui-tests/message-browser.c delete mode 100644 tests/ui-tests/saveoptions.xml delete mode 100644 tests/ui-tests/store_listing.c delete mode 100644 tests/ui-tests/store_listing.glade delete mode 100644 tests/ui-tests/test-multipart-alt.msg delete mode 100644 tests/ui-tests/test-multipart-mixed.msg (limited to 'tests') diff --git a/tests/.cvsignore b/tests/.cvsignore deleted file mode 100644 index 1ad18182a2..0000000000 --- a/tests/.cvsignore +++ /dev/null @@ -1,24 +0,0 @@ -test1 -test2 -test3 -test4 -test5 -test6 -test7 -test8 -test9 -test10 -test11 -test12 -test13 -Makefile.in -Makefile -.deps -.libs -.pure -mail1.test -mail2.test -test-formatter -test-movemail -test-url - diff --git a/tests/Makefile.am b/tests/Makefile.am deleted file mode 100644 index a73eb21c55..0000000000 --- a/tests/Makefile.am +++ /dev/null @@ -1,73 +0,0 @@ -# process this file with automake to create Makefile.in - -INCLUDES = -I$(top_srcdir)/intl -I$(top_srcdir) -I$(top_srcdir)/camel \ - -I$(includedir) -I$(top_srcdir)/camel/providers/pop3 \ - -I$(top_srcdir)/camel/providers/mbox -I$(top_srcdir)/camel/providers/nntp \ - -DG_LOG_DOMAIN=\"evolution-tests\" - -LDADD = \ - $(top_builddir)/camel/libcamel.la \ - $(top_builddir)/e-util/libeutil.la \ - $(top_builddir)/libibex/libibex.la \ - $(GNOME_LIBDIR) \ - $(GNOMEUI_LIBS) $(INTLLIBS) $(EXTRA_GNOME_LIBS) -# $(BONOBO_LIBS) - - - - -#test4_LDADD = \ -# $(top_builddir)/camel/libcamel.la \ -# $(top_builddir)/camel/providers/MH/libcamelmh.la \ -# $(GNOME_LIBDIR) \ -# $(GNOMEUI_LIBS) $(INTLLIBS) $(PTHREAD_LIB) - -#test11_LDADD = \ -# $(LDADD) \ -# $(top_builddir)/filter/libfilter.la \ -# $(top_builddir)/libibex/libibex.a - -#test9_LDADD = \ -# $(top_builddir)/camel/libcamel.la \ -# $(top_builddir)/camel/providers/mbox/libcamelmbox.la \ -# $(top_builddir)/libibex/libibex.la \ -# $(GNOME_LIBDIR) \ -# $(GNOMEUI_LIBS) $(INTLLIBS) $(EXTRA_GNOME_LIBS) - -test14_LDADD = \ - $(top_builddir)/camel/providers/vee/libcamelvee.la \ - $(top_builddir)/camel/libcamel.la \ - $(top_builddir)/libibex/libibex.la \ - $(GNOME_LIBDIR) \ - $(GNOMEUI_LIBS) $(INTLLIBS) $(EXTRA_GNOME_LIBS) - -#test12_LDADD = \ -# $(top_builddir)/camel/libcamel.la \ -# $(top_builddir)/camel/providers/nntp/libcamelnntp.la \ -# $(top_builddir)/libibex/libibex.la \ -# $(GNOME_LIBDIR) \ -# $(GNOMEUI_LIBS) $(INTLLIBS) $(EXTRA_GNOME_LIBS) - -test_movemail_LDADD = \ - $(top_builddir)/camel/libcamel.la \ - $(top_builddir)/e-util/libeutil.la \ - $(top_builddir)/libibex/libibex.la \ - $(GNOME_LIBDIR) \ - $(GNOMEUI_LIBS) $(INTLLIBS) $(EXTRA_GNOME_LIBS) - -THREAD_RELATED_TESTS=test8 - -noinst_PROGRAMS = \ - test1 \ - test2 \ - test10 \ - test11 \ - test13 \ - test14 \ - test-movemail \ - test-url \ - $(THREAD_RELATED_TESTS) - -# test3 \ -# test12 \ -# test-formatter diff --git a/tests/test-movemail.c b/tests/test-movemail.c deleted file mode 100644 index bcd5334b5a..0000000000 --- a/tests/test-movemail.c +++ /dev/null @@ -1,164 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ - -#include -#include - -static char * -auth_callback (char *prompt, gboolean secret, CamelService *service, - char *item, CamelException *ex) -{ - char buf[80]; - - printf ("%s\n", prompt); - if (secret) - printf ("(Warning: your input will be displayed)\n"); - if (fgets (buf, sizeof (buf), stdin) == NULL) { - camel_exception_set (ex, CAMEL_EXCEPTION_USER_CANCEL, - "User cancelled input."); - return NULL; - } - return g_strdup (buf); -} - -extern char *evolution_folders_dir; - -int main (int argc, char **argv) -{ - CamelSession *session; - CamelException *ex; - CamelStore *store, *outstore; - CamelFolder *folder, *outfolder; - int nmsgs, i; - CamelMimeMessage *msg; - char *url; - gboolean delete = FALSE; - - gtk_init (&argc, &argv); - camel_init (); - - if (argc == 3) { - if (!strcmp (argv[1], "--delete") || - !strcmp (argv[1], "-d")) { - delete = TRUE; - argc--; - argv++; - } - } - if (argc != 2) { - fprintf (stderr, "Usage: test-movemail [--delete] url\n"); - exit (1); - } - e_setup_base_dir (); - session = camel_session_new (auth_callback); - - ex = camel_exception_new (); - store = camel_session_get_store (session, argv[1], ex); - if (!store) { - fprintf(stderr, "Could not open store %s:\n%s\n", argv[1], - camel_exception_get_description (ex)); - exit (1); - } - camel_service_connect_with_url (CAMEL_SERVICE (store), argv[1], ex); - if (camel_exception_get_id (ex) != CAMEL_EXCEPTION_NONE) { - printf ("Couldn't connect to %s:\n%s\n", argv[1], - camel_exception_get_description (ex)); - exit (1); - } - - folder = camel_store_get_folder (store, "inbox", ex); - if (!folder) { - fprintf(stderr, "Could not get inbox:\n%s\n", - camel_exception_get_description (ex)); - exit (1); - } - camel_folder_open (folder, FOLDER_OPEN_READ, ex); - if (camel_exception_get_id (ex) != CAMEL_EXCEPTION_NONE) { - printf ("Couldn't open folder: %s\n", - camel_exception_get_description (ex)); - exit (1); - } - - nmsgs = camel_folder_get_message_count (folder, ex); - if (camel_exception_get_id (ex) != CAMEL_EXCEPTION_NONE) { - printf ("Couldn't get message count: %s\n", - camel_exception_get_description (ex)); - exit (1); - } - printf ("Inbox contains %d messages.\n", nmsgs); - -#ifdef DISPLAY_ONLY - stdout_stream = camel_stream_fs_new_with_fd (1); -#else - url = g_strdup_printf ("mbox://%s", evolution_folders_dir); - outstore = camel_session_get_store (session, url, ex); - g_free (url); - if (camel_exception_get_id (ex) != CAMEL_EXCEPTION_NONE) { - printf ("Couldn't open output store: %s\n", - camel_exception_get_description (ex)); - exit (1); - } - outfolder = camel_store_get_folder (outstore, "inbox", ex); - if (camel_exception_get_id (ex) != CAMEL_EXCEPTION_NONE) { - printf ("Couldn't make output folder: %s\n", - camel_exception_get_description (ex)); - exit (1); - } - camel_folder_open (outfolder, FOLDER_OPEN_WRITE, ex); - if (camel_exception_get_id (ex) != CAMEL_EXCEPTION_NONE) { - printf ("Couldn't open output folder: %s\n", - camel_exception_get_description (ex)); - exit (1); - } -#endif - - for (i = 1; i <= nmsgs; i++) { - msg = camel_folder_get_message_by_number (folder, i, ex); - if (camel_exception_get_id (ex) != CAMEL_EXCEPTION_NONE) { - printf ("Couldn't get message: %s\n", - camel_exception_get_description (ex)); - exit (1); - } - -#ifdef DISPLAY_ONLY - camel_data_wrapper_write_to_stream (CAMEL_DATA_WRAPPER (msg), - stdout_stream); -#else - camel_folder_append_message (outfolder, msg, ex); - if (camel_exception_get_id (ex) != CAMEL_EXCEPTION_NONE) { - printf ("Couldn't write message: %s\n", - camel_exception_get_description (ex)); - exit (1); - } - - if (delete) { - camel_folder_delete_message_by_number (folder, i, ex); - if (camel_exception_get_id (ex) != - CAMEL_EXCEPTION_NONE) { - printf ("Couldn't delete message: %s\n", - camel_exception_get_description (ex)); - exit (1); - } - } -#endif - } - -#ifndef DISPLAY_ONLY - camel_folder_close (outfolder, FALSE, ex); -#endif - camel_folder_close (folder, TRUE, ex); - - camel_service_disconnect (CAMEL_SERVICE (store), ex); - if (camel_exception_get_id (ex) != CAMEL_EXCEPTION_NONE) { - printf ("Couldn't disconnect: %s\n", - camel_exception_get_description (ex)); - exit (1); - } - - return 0; -} - -void -gratuitous_dependency_generator() -{ - xmlSetProp(); -} diff --git a/tests/test-url.c b/tests/test-url.c deleted file mode 100644 index 5d8d75951b..0000000000 --- a/tests/test-url.c +++ /dev/null @@ -1,37 +0,0 @@ -#include - -int main (int argc, char **argv) -{ - CamelURL *url; - CamelException *ex; - - if (argc != 2) { - fprintf (stderr, "Usage: test-url URL\n"); - exit (1); - } - - ex = camel_exception_new (); - url = camel_url_new (argv[1], ex); - if (!url) { - fprintf (stderr, "Could not parse URL:\n%s", - camel_exception_get_description (ex)); - exit (1); - } - - printf ("URL : %s\n\n", camel_url_to_string (url, TRUE)); - printf ("Protocol: %s\n", url->protocol); - if (url->user) - printf ("User : %s\n", url->user); - if (url->authmech) - printf ("Authmech: %s\n", url->authmech); - if (url->passwd) - printf ("Password: %s\n", url->passwd); - if (url->host) - printf ("Host : %s\n", url->host); - if (url->port) - printf ("Port : %d\n", url->port); - if (url->path) - printf ("Path : %s\n", url->path); - - return 0; -} diff --git a/tests/test1.c b/tests/test1.c deleted file mode 100644 index c21cfd371b..0000000000 --- a/tests/test1.c +++ /dev/null @@ -1,136 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ - -#include - -#include "camel-mime-message.h" -#include "camel-multipart.h" -#include "camel-stream.h" -#include "camel-stream-fs.h" -#include "camel-data-wrapper.h" -#include "camel.h" - -int -main (int argc, char**argv) -{ - CamelMimeMessage *message; - CamelMultipart *multipart; - CamelMimePart *body_part; - CamelMimePart *attachment_part; - CamelStream *attachment_stream; - CamelStream *stream; - CamelException *ex = camel_exception_new (); - - gtk_init (&argc, &argv); - camel_init (); - - if (argc < 2) { - attachment_stream = NULL; - } else { - if (argc == 2) { - attachment_stream = camel_stream_fs_new_with_name (argv[1], O_RDONLY, 0, ex); - if (attachment_stream == NULL) { - fprintf (stderr, "Cannot open `%s': %s\n", - argv[1], - camel_exception_get_description (ex)); - return 1; - } - } else { - fprintf (stderr, "Usage: %s []\n", - argv[0]); - return 1; - } - } - - message = camel_mime_message_new (); - - camel_mime_part_set_description (CAMEL_MIME_PART (message), "a test"); - - camel_medium_add_header (CAMEL_MEDIUM (message), "X-test1", "the value of a test"); - camel_medium_add_header (CAMEL_MEDIUM (message), "X-test2", "the value of another test"); - /*camel_mime_part_add_content_language (CAMEL_MIME_PART (message), g_string_new ("es-ca"));*/ - - camel_mime_message_set_date (message, CAMEL_MESSAGE_DATE_CURRENT, 0); - camel_mime_message_set_subject (message, g_strdup ("A test message")); - camel_mime_message_set_reply_to (message, g_strdup ("toto@toto.com")); - camel_mime_message_set_from (message, g_strdup ("Bertrand.Guiheneuf@aful.org")); - - camel_mime_message_add_recipient (message, CAMEL_RECIPIENT_TYPE_TO, - "Franck DeChamps", "franck.dechamps@alseve.fr"); - camel_mime_message_add_recipient (message, CAMEL_RECIPIENT_TYPE_TO, - NULL, "mc@alseve.fr"); - camel_mime_message_add_recipient (message, CAMEL_RECIPIENT_TYPE_TO, - "Richo", "richard.lengagne@inria.fr"); - camel_mime_message_add_recipient (message, CAMEL_RECIPIENT_TYPE_CC, - "Frank", "Francois.fleuret@inria.fr"); - camel_mime_message_add_recipient (message, CAMEL_RECIPIENT_TYPE_CC, - NULL, "maury@justmagic.com"); - camel_mime_message_add_recipient (message, CAMEL_RECIPIENT_TYPE_BCC, - "Bertie", "Bertrand.Guiheneuf@aful.org"); - - multipart = camel_multipart_new (); - body_part = camel_mime_part_new (); - camel_mime_part_set_content (CAMEL_MIME_PART (body_part), "This is a test.\nThis is only a test.\n", - strlen("This is a test.\nThis is only a test.\n"), "text/plain"); - camel_multipart_add_part (multipart, body_part); - - if (attachment_stream == NULL) { - attachment_part = NULL; - } else { - CamelDataWrapper *attachment_wrapper; - - /*CamelDataWrapper *stream_wrapper; - - stream_wrapper = camel_stream_data_wrapper_new - (attachment_stream); - - attachment_part = camel_mime_body_part_new (); - camel_mime_part_set_encoding (CAMEL_MIME_PART (attachment_part), - CAMEL_MIME_PART_ENCODING_BASE64); - camel_medium_set_content_object (CAMEL_MEDIUM (attachment_part), - stream_wrapper); - camel_multipart_add_part (multipart, attachment_part); - - gtk_object_unref (GTK_OBJECT (stream_wrapper));*/ - - attachment_wrapper = camel_data_wrapper_new (); - camel_data_wrapper_construct_from_stream (attachment_wrapper, - attachment_stream); - - attachment_part = camel_mime_part_new (); - camel_mime_part_set_encoding (CAMEL_MIME_PART (attachment_part), - CAMEL_MIME_PART_ENCODING_BASE64); - camel_medium_set_content_object (CAMEL_MEDIUM (attachment_part), - attachment_wrapper); - camel_multipart_add_part (multipart, attachment_part); - } - - camel_medium_set_content_object (CAMEL_MEDIUM (message), CAMEL_DATA_WRAPPER (multipart)); - - stream = camel_stream_fs_new_with_name ("mail1.test", O_WRONLY|O_TRUNC|O_CREAT, 0600, ex); - if (!stream) { - printf ("Could not open output file: %s\n", - camel_exception_get_description (ex)); - exit(2); - } - - camel_data_wrapper_write_to_stream (CAMEL_DATA_WRAPPER (message), - stream, ex); - camel_stream_flush (stream, ex); - gtk_object_unref (GTK_OBJECT (stream)); - if (camel_exception_is_set (ex)) { - printf ("Oops. Failed. %s\n", - camel_exception_get_description (ex)); - exit (1); - } - - gtk_object_unref (GTK_OBJECT (message)); - gtk_object_unref (GTK_OBJECT (multipart)); - gtk_object_unref (GTK_OBJECT (body_part)); - - if (attachment_part != NULL) - gtk_object_unref (GTK_OBJECT (attachment_part)); - - printf ("Test1 finished\n"); - return 1; -} - diff --git a/tests/test10.c b/tests/test10.c deleted file mode 100644 index efe069242a..0000000000 --- a/tests/test10.c +++ /dev/null @@ -1,127 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ - - -#include "camel.h" -#include "camel-mbox-folder.h" -#include "camel-exception.h" -#include "md5-utils.h" -#include -#include -#include -#include -#include -#include -#include - - -static CamelMimeMessage * -create_sample_mime_message () -{ - CamelMimeMessage *message; - CamelMimePart *body_part; - CamelMultipart *multipart; - - - message = camel_mime_message_new (); - - camel_mime_part_set_description (CAMEL_MIME_PART (message), "a test"); - - camel_medium_add_header (CAMEL_MEDIUM (message), "X-test1", "the value of a test"); - camel_medium_add_header (CAMEL_MEDIUM (message), "X-test2", "the value of another test"); - - camel_mime_message_set_date (message, time(0), 200); - camel_mime_message_set_subject (message, "A test message"); - camel_mime_message_set_reply_to (message, "toto@toto.com"); - camel_mime_message_set_from (message, "Bertrand.Guiheneuf@aful.org"); - - camel_mime_message_add_recipient (message, CAMEL_RECIPIENT_TYPE_TO, - "Franck DeChamps", "franck.dechamps@alseve.fr"); - camel_mime_message_add_recipient (message, CAMEL_RECIPIENT_TYPE_TO, - NULL, "mc@alseve.fr"); - camel_mime_message_add_recipient (message, CAMEL_RECIPIENT_TYPE_TO, - "Richo", "richard.lengagne@inria.fr"); - camel_mime_message_add_recipient (message, CAMEL_RECIPIENT_TYPE_CC, - "Frank", "Francois.fleuret@inria.fr"); - camel_mime_message_add_recipient (message, CAMEL_RECIPIENT_TYPE_CC, - NULL, "maury@justmagic.com"); - camel_mime_message_add_recipient (message, CAMEL_RECIPIENT_TYPE_BCC, - "Bertie", "Bertrand.Guiheneuf@aful.org"); - - multipart = camel_multipart_new (); - body_part = camel_mime_part_new (); - camel_mime_part_set_content (CAMEL_MIME_PART (body_part), "This is a test.\nThis is only a test.\n", - strlen("This is a test.\nThis is only a test.\n"), "text/plain"); - camel_multipart_add_part (multipart, body_part); - camel_medium_set_content_object (CAMEL_MEDIUM (message), CAMEL_DATA_WRAPPER (multipart)); - - return message; -} - -static char * -auth_callback(char *prompt, gboolean secret, - CamelService *service, char *item, - CamelException *ex) -{ - printf ("auth_callback called: %s\n", prompt); - return NULL; -} - - - - -int -main (int argc, char**argv) -{ - CamelSession *session; - CamelException *ex; - CamelStore *store; - gchar *store_url = "mbox:///tmp/evmail"; - CamelFolder *folder; - CamelMimeMessage *message; - GList *uid_list; - - gtk_init (&argc, &argv); - camel_init (); - ex = camel_exception_new (); - - session = camel_session_new (auth_callback); - store = camel_session_get_store (session, store_url, ex); - if (camel_exception_get_id (ex)) { - printf ("Exception caught in camel_session_get_store\n" - "Full description : %s\n", camel_exception_get_description (ex)); - return -1; - } - - folder = camel_store_get_folder (store, "Inbox", ex); - if (camel_exception_get_id (ex)) { - printf ("Exception caught in camel_store_get_folder\n" - "Full description : %s\n", camel_exception_get_description (ex)); - return -1; - } - - camel_folder_open (folder, FOLDER_OPEN_RW, ex); - if (camel_exception_get_id (ex)) { - printf ("Exception caught when trying to open the folder\n" - "Full description : %s\n", camel_exception_get_description (ex)); - return -1; - } - - message = create_sample_mime_message (); - camel_folder_append_message (folder, message, ex); - if (camel_exception_get_id (ex)) { - printf ("Exception caught when trying to append a message to the folder\n" - "Full description : %s\n", camel_exception_get_description (ex)); - return -1; - } - - uid_list = camel_folder_get_uid_list (folder, ex); - - - camel_folder_get_message_by_uid (folder, (gchar *)uid_list->data, ex); - camel_folder_close (folder, FALSE, ex); - return 1; -} - - - - diff --git a/tests/test11.c b/tests/test11.c deleted file mode 100644 index 1323a5f90b..0000000000 --- a/tests/test11.c +++ /dev/null @@ -1,136 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ - -/* - Test search api - */ - - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -static char * -auth_callback(char *prompt, gboolean secret, - CamelService *service, char *item, - CamelException *ex) -{ - printf ("auth_callback called: %s\n", prompt); - return NULL; -} - -int -main (int argc, char**argv) -{ - CamelSession *session; - CamelException *ex; - CamelStore *store; - gchar *store_url = "mbox:///tmp/evmail"; - CamelFolder *folder, *outbox; - GList *n, *matches; - - gtk_init (&argc, &argv); - camel_init (); - ex = camel_exception_new (); - - session = camel_session_new (auth_callback); - - camel_provider_load (session, "../camel/providers/mbox/.libs/libcamelmbox.so.0", ex); - if (camel_exception_get_id (ex)) { - printf ("Exceptions suck: %s\n", camel_exception_get_description (ex)); - return 1; - } - - store = camel_session_get_store (session, store_url, ex); - if (camel_exception_get_id (ex)) { - printf ("Exception caught in camel_session_get_store\n" - "Full description : %s\n", camel_exception_get_description (ex)); - return -1; - } - - printf("get folder\n"); - - folder = camel_store_get_folder (store, "Inbox", ex); - if (camel_exception_get_id (ex)) { - printf ("Exception caught in camel_store_get_folder\n" - "Full description : %s\n", camel_exception_get_description (ex)); - return -1; - } - - printf("open folder\n"); - - camel_folder_open (folder, FOLDER_OPEN_READ, ex); - if (camel_exception_get_id (ex)) { - printf ("Exception caught when trying to open the folder\n" - "Full description : %s\n", camel_exception_get_description (ex)); - return -1; - } - - printf("create output folder ...\n"); - outbox = camel_store_get_folder (store, "Gnome", ex); - if (!camel_folder_exists(outbox, ex)) { - camel_folder_create(outbox, ex); - } - - camel_folder_open (outbox, FOLDER_OPEN_WRITE, ex); - - printf("Search for messages\n"); - - matches = camel_folder_search_by_expression (folder, -/* "(match-all (header-contains \"subject\" \"gnome\"))",*/ - "(body-contains \"gnome\")", - ex); - - printf("search found matches:\n"); - n = matches; - while (n) { - CamelMimeMessage *m; - - printf("uid: %s\n", (char *) n->data); - m = camel_folder_get_message_by_uid(folder, n->data, ex); - - if (camel_exception_get_id (ex)) { - printf ("Cannot get message\n" - "Full description : %s\n", camel_exception_get_description (ex)); - camel_exception_init(ex); - } else { - -#if 1 - - camel_folder_append_message(outbox, m, ex); - - if (camel_exception_get_id (ex)) { - printf ("Cannot save message\n" - "Full description : %s\n", camel_exception_get_description (ex)); - } - - printf("Removing matching message from source folder?\n"); - camel_mime_message_set_flags(m, CAMEL_MESSAGE_DELETED, CAMEL_MESSAGE_DELETED); -/* camel_mime_message_set_flags(m, CAMEL_MESSAGE_ANSWERED, CAMEL_MESSAGE_ANSWERED);*/ -#endif - - } - if (m) - gtk_object_unref(m); - n = g_list_next(n); - } - - camel_folder_close (outbox, TRUE, ex); - camel_folder_close (folder, TRUE, ex); - - gtk_object_unref((GtkObject *)outbox); - gtk_object_unref((GtkObject *)folder); - - return 0; -} - - - - diff --git a/tests/test12.c b/tests/test12.c deleted file mode 100644 index 223eb980a8..0000000000 --- a/tests/test12.c +++ /dev/null @@ -1,56 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ - -#include - -#include "camel.h" -#include "camel-nntp-store.h" -#include "camel-session.h" -#include "camel-exception.h" - -static char* -authenticator (char *prompt, gboolean secret, CamelService *service, char *item, - CamelException *ex) -{ -} - -static void -print_name(gpointer data, gpointer foo) -{ - printf ("%s\n", (char*)data); -} - -int -main (int argc, char **argv) -{ - CamelSession *session; - CamelException *ex; - CamelStore *store; - CamelFolder *n_p_m_a; - GList *groups; - const gchar *news_url = "news://news.mozilla.org"; - - gtk_init (&argc, &argv); - camel_init (); - ex = camel_exception_new (); - - g_assert (camel_provider_register_as_module ("/usr/local/lib/evolution/camel-providers/0.0.1/libcamelnntp.so")); - - session = camel_session_new (authenticator); - store = camel_session_get_store (session, news_url, ex); - - g_assert (store); - - camel_nntp_store_subscribe_group (store, "netscape.public.mozilla.announce"); - - printf ("subscribed groups on %s\n", news_url); - - groups = camel_nntp_store_list_subscribed_groups (store); - - g_list_foreach(groups, print_name, NULL); - - n_p_m_a = camel_store_get_folder (store, "netscape.public.mozilla.announce", ex); - - camel_folder_open(n_p_m_a, FOLDER_OPEN_READ, ex); - - camel_folder_close(n_p_m_a, FALSE, ex); -} diff --git a/tests/test13.c b/tests/test13.c deleted file mode 100644 index 3e191eddf5..0000000000 --- a/tests/test13.c +++ /dev/null @@ -1,123 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* tests mime message file parsing */ -#include "stdio.h" -#include "camel-mime-message.h" -#include "camel-mime-part.h" -#include "camel-stream.h" -#include "camel-stream-fs.h" -#include "camel.h" - - -static void -dump_message_content(CamelDataWrapper *object) -{ - CamelDataWrapper *containee; - CamelStream *stream; - int parts, i; - int len; - int left; - char buffer[128]; - - printf("Dumping message ..."); - - containee = camel_medium_get_content_object(CAMEL_MEDIUM(object)); - - if (containee) { - char *type = gmime_content_field_get_mime_type(containee->mime_type); - - printf("type = %s\n", type); - - if (CAMEL_IS_MULTIPART(containee)) { - parts = camel_multipart_get_number (CAMEL_MULTIPART(containee)); - printf("multipart message, scanning contents %d parts ...\n", parts); - for (i=0;i 0) { - fwrite(buffer, len, 1, stdout); - } - printf("\n"); - } else { - g_warning("cannot get stream for message?"); - } - } - - g_free(type); - } else { - printf("no containee?\n"); - } -} - -int -main (int argc, char**argv) -{ - CamelMimeMessage *message; - CamelStream *input_stream, *output_stream; - CamelMimeParser *parser; - - gtk_init (&argc, &argv); - camel_init (); - -/* should have another program to test all this internationalisation/header parsing stuff */ -#if 0 - { - char *s, *o; - s = "This is a test, simple ascii text"; - o = header_encode_string(s); - printf("%s -> %s\n", s, o); - s = "To: Markus \"DÅhr\" "; - o = header_encode_string(s); - printf("%s -> %s\n", s, o); - - s = "From: =?iso-8859-1?Q?Kenneth_ll=E9phaane_Christiansen?= "; - o = header_encode_string(s); - printf("%s -> %s\n", s, o); - - printf("decoding ... \n"); - s = "From: =?iso-8859-1?Q?Kenneth_ll=E9phaane_Christiansen?= "; - o = header_decode_string(s); - printf("%s -> %s\n", s, o); - - printf("reencoded\n"); - s = header_encode_string(o); - printf("%s -> %s\n", o, s); - return 0; - } -#endif - - message = camel_mime_message_new (); - - - input_stream = camel_stream_fs_new_with_name ("mail.test", O_RDONLY, 0, NULL); - if (!input_stream) { - perror ("could not open input file\n"); - printf ("You must create the file mail.test before running this test\n"); - exit(2); - } - - printf("creating parser to create message\n"); - parser = camel_mime_parser_new(); - camel_mime_parser_init_with_stream(parser, input_stream); - camel_mime_part_construct_from_parser(CAMEL_MIME_PART (message), - parser); - - dump_message_content(CAMEL_DATA_WRAPPER (message)); - - gtk_object_unref (GTK_OBJECT (input_stream)); - - output_stream = camel_stream_fs_new_with_name ("mail2.test", O_WRONLY|O_CREAT|O_TRUNC, 0600, NULL); - camel_data_wrapper_write_to_stream (CAMEL_DATA_WRAPPER (message), output_stream, NULL); - camel_stream_flush (output_stream, NULL); - gtk_object_unref (GTK_OBJECT (output_stream)); - - //gtk_object_unref (GTK_OBJECT (message)); - return 0; - -} diff --git a/tests/test14.c b/tests/test14.c deleted file mode 100644 index 80963415db..0000000000 --- a/tests/test14.c +++ /dev/null @@ -1,177 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ - -/* - Test vfolder. - */ - - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -static void -dump_message_content(CamelDataWrapper *object) -{ - CamelDataWrapper *containee; - CamelStream *stream; - int parts, i; - int len; - int left; - char buffer[128]; - - printf("Dumping message ..."); - - containee = camel_medium_get_content_object(CAMEL_MEDIUM(object)); - - if (containee) { - char *type = gmime_content_field_get_mime_type(containee->mime_type); - - printf("type = %s\n", type); - - if (CAMEL_IS_MULTIPART(containee)) { - parts = camel_multipart_get_number (CAMEL_MULTIPART(containee)); - printf("multipart message, scanning contents %d parts ...\n", parts); - for (i=0;i 0) { - fwrite(buffer, len, 1, stdout); - } - printf("\n"); - } else { - g_warning("cannot get stream for message?"); - } - } - - g_free(type); - } else { - printf("no containee?\n"); - } -} - - -static char * -auth_callback(char *prompt, gboolean secret, - CamelService *service, char *item, - CamelException *ex) -{ - printf ("auth_callback called: %s\n", prompt); - return NULL; -} - -int -main (int argc, char**argv) -{ - CamelSession *session; - CamelException *ex; - CamelStore *store; - gchar *store_url = "vfolder:"; - CamelFolder *folder; - GList *n, *matches; - - gtk_init (&argc, &argv); - camel_init (); - ex = camel_exception_new (); - - session = camel_session_new (auth_callback); - - camel_provider_load (session, "../camel/providers/vee/.libs/libcamelvee.so.0", ex); - if (camel_exception_get_id (ex)) { - printf ("Exceptions suck: %s\n", camel_exception_get_description (ex)); - return 1; - } - - store = camel_session_get_store (session, store_url, ex); - if (camel_exception_get_id (ex)) { - printf ("Exception caught in camel_session_get_store\n" - "Full description : %s\n", camel_exception_get_description (ex)); - return -1; - } - - printf("get folder\n"); - - folder = camel_store_get_folder (store, "gnome_email?(match-all (header-contains \"subject\" \"gnome\"))", ex); - if (camel_exception_get_id (ex)) { - printf ("Exception caught in camel_store_get_folder\n" - "Full description : %s\n", camel_exception_get_description (ex)); - return -1; - } - - /* setup searched folders */ - { - CamelFolder *subfolder; - CamelStore *substore; - - substore = camel_session_get_store (session, "mbox:///home/notzed/evolution/local/Inbox", ex); - subfolder = camel_store_get_folder(substore, "mbox", ex); - camel_folder_open (subfolder, FOLDER_OPEN_READ, ex); - camel_vee_folder_add_folder(folder, subfolder); - - if (camel_exception_get_id (ex)) { - printf ("Exception caught in camel_store_get_folder\n" - "Full description : %s\n", camel_exception_get_description (ex)); - return -1; - } - - substore = camel_session_get_store (session, "mbox:///home/notzed/evolution/local/Outbox", ex); - subfolder = camel_store_get_folder(substore, "mbox", ex); - camel_folder_open (subfolder, FOLDER_OPEN_READ, ex); - camel_vee_folder_add_folder(folder, subfolder); - - if (camel_exception_get_id (ex)) { - printf ("Exception caught in camel_store_get_folder\n" - "Full description : %s\n", camel_exception_get_description (ex)); - return -1; - } - } - - printf("open folder\n"); - - camel_folder_open (folder, FOLDER_OPEN_READ, ex); - if (camel_exception_get_id (ex)) { - printf ("Exception caught when trying to open the folder\n" - "Full description : %s\n", camel_exception_get_description (ex)); - return -1; - } - - printf("vfolder's uid's:\n"); - n = camel_folder_get_uid_list(folder, ex); - while (n) { - CamelMimeMessage *m; - - printf("uid: %s\n", (char *) n->data); - - m = camel_folder_get_message_by_uid(folder, n->data, ex); - if (m) { - dump_message_content(m); - gtk_object_unref(m); - } - n = g_list_next(n); - } - - camel_folder_close (folder, TRUE, ex); - - gtk_object_unref((GtkObject *)folder); - - return 0; -} - - - - diff --git a/tests/test2.c b/tests/test2.c deleted file mode 100644 index a6299357cb..0000000000 --- a/tests/test2.c +++ /dev/null @@ -1,48 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* tests mime message file parsing */ -#include "stdio.h" -#include "camel-mime-message.h" -#include "camel-mime-part.h" -#include "camel-stream.h" -#include "camel-stream-fs.h" -#include "camel.h" - -int -main (int argc, char**argv) -{ - CamelMimeMessage *message; - CamelStream *input_stream; - CamelException *ex = camel_exception_new (); - - gtk_init (&argc, &argv); - camel_init (); - - message = camel_mime_message_new (); - - - input_stream = camel_stream_fs_new_with_name ("mail.test", O_RDONLY, 0, ex); - if (!input_stream) { - perror ("could not open input file\n"); - printf ("You must create the file mail.test before running this test\n"); - exit(2); - } - - - camel_data_wrapper_construct_from_stream ( CAMEL_DATA_WRAPPER (message), input_stream); - - camel_medium_get_content_object (CAMEL_MEDIUM (message)); - -#if 0 - camel_stream_close (input_stream); - gtk_object_unref (GTK_OBJECT (input_stream)); - - output_stream = camel_stream_fs_new_with_name ("mail2.test", O_WRONLY|O_TRUNC|O_CREAT, 0600); - camel_data_wrapper_write_to_stream (CAMEL_DATA_WRAPPER (message), output_stream); - camel_stream_close (output_stream); - gtk_object_unref (GTK_OBJECT (output_stream)); - - //gtk_object_unref (GTK_OBJECT (message)); -#endif - return 0; - -} diff --git a/tests/test3.c b/tests/test3.c deleted file mode 100644 index 9893e2e507..0000000000 --- a/tests/test3.c +++ /dev/null @@ -1,29 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -#include "camel.h" - -int -main (int argc, char**argv) -{ - GtkType type; - - gtk_init (&argc, &argv); - camel_init (); - - printf ("Test 3 : data wrapper repository\n"); - - printf ("\nMime type : \"multipart\"\n"); - type = data_wrapper_repository_get_data_wrapper_type ("multipart"); - printf ("Type found %s\n", gtk_type_name (type) ); - - printf ("\nMime type : \"multipart/alternative\"\n"); - type = data_wrapper_repository_get_data_wrapper_type ("multipart/alternative"); - printf ("Type found %s\n", gtk_type_name (type) ); - - printf ("\nMime type : \"toto/titi\"\n"); - type = data_wrapper_repository_get_data_wrapper_type ("toto/titi"); - printf ("Type found %s\n", gtk_type_name (type) ); - - printf ("Test3 finished\n"); - return 1; -} - diff --git a/tests/test4.c b/tests/test4.c deleted file mode 100644 index bc9eef71d1..0000000000 --- a/tests/test4.c +++ /dev/null @@ -1,65 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ - -/* testing mh providers - 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" - -int -main (int argc, char**argv) -{ - CamelStore *store; - CamelFolder *inbox_folder; - CamelFolder *root_mh_folder; - GList *mh_subfolders_name; - CamelMimeMessage *message_1; - gboolean inbox_exists; - - 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")); - - root_mh_folder = camel_store_get_folder (store, ""); - mh_subfolders_name = camel_folder_list_subfolders (root_mh_folder, NULL); - - printf ("\n------------- Listing root Mh folder subfolders --------\n"); - while (mh_subfolders_name) { - printf ("\t\"%s\"\n", (gchar *)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"); - return 1; - } - - /* test existence */ - inbox_exists = camel_folder_exists (inbox_folder, NULL); - if (inbox_exists) - printf ("MH folder inbox exists, continuing tests\n"); - else { - printf ("MH folder inbox does not exist. Stopping \n"); - return 1; - } - - printf ("\n Inbox folder contains %d messages\n", camel_folder_get_message_count (inbox_folder, NULL)); - printf ("\n------------- Gettting message numer 3 in inbox --------\n"); - message_1 = camel_folder_get_message (inbox_folder, 3, NULL); - printf ("--------------------------------------------------------\n\n"); - - - return 1; - - -} diff --git a/tests/test5.c b/tests/test5.c deleted file mode 100644 index 81c5e2256a..0000000000 --- a/tests/test5.c +++ /dev/null @@ -1,59 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ - -/* test for the RFC 2047 decoder */ - -#include -#include - -#include "gmime-utils.h" -#include "stdio.h" -#include "camel-mime-message.h" -#include "camel-mime-part.h" -#include "camel-stream.h" -#include "camel-stream-fs.h" -#include "camel.h" -#include "gmime-rfc2047.h" - -#define TERMINAL_CHARSET "UTF-8" - -/* - * Info on many unicode issues, including, utf-8 xterms from : - * - * http://www.cl.cam.ac.uk/~mgk/unicode.html - * - */ - -const char *tests[] = -{ -/* these strings come from RFC 2047. Ought to add a few torture cases here. */ - "=?US-ASCII?Q?Keith_Moore?= ", - "=?ISO-8859-1?Q?Keld_J=F8rn_Simonsen?= ", - "=?ISO-8859-1?Q?Andr=E9?= Pirard ", - "=?ISO-8859-1?B?SWYgeW91IGNhbiByZWFkIHRoaXMgeW8=?= =?ISO-8859-2?B?dSB1bmRlcnN0YW5kIHRoZSBleGFtcGxlLg==?=", - "=?ISO-8859-1?Q?Olle_J=E4rnefors?= ", - "=?ISO-8859-1?Q?Patrik_F=E4ltstr=F6m?= ", - "Nathaniel Borenstein (=?iso-8859-8?b?7eXs+SDv4SDp7Oj08A==?=)", - "", - "(=?ISO-8859-1?Q?a?=)", /* should be displayed as (a) */ - "(=?ISO-8859-1?Q?a?= b)", /* (a b) */ - "(=?ISO-8859-1?Q?a?= =?ISO-8859-1?Q?b?=)", /* (ab) */ - "(=?ISO-8859-1?Q?a?= =?ISO-8859-1?Q?b?=)", /* (ab) */ - "(=?ISO-8859-1?Q?a?= \n=?ISO-8859-1?Q?b?=)", /* (ab) */ - "(=?ISO-8859-1?Q?a_b?=)", /* (a b) */ - "(=?ISO-8859-1?Q?a?= =?ISO-8859-2?Q?_b?=)", /* (ab) */ - NULL -}; - - -int -main (int argc, char**argv) -{ - const char **b = tests; - while (*b) { - printf("%s\n", gmime_rfc2047_decode(*b, TERMINAL_CHARSET)); - b++; - } - - return 0; - -} diff --git a/tests/test6.c b/tests/test6.c deleted file mode 100644 index c2883d89c0..0000000000 --- a/tests/test6.c +++ /dev/null @@ -1,49 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ - -/* test for the RFC 2047 encoder */ - -#include -#include - -#include "gmime-utils.h" -#include "stdio.h" -#include "camel-mime-message.h" -#include "camel-mime-part.h" -#include "camel-stream.h" -#include "camel-stream-fs.h" -#include "camel.h" -#include "gmime-rfc2047.h" - -#define TERMINAL_CHARSET "UTF-8" - -/* - * Info on many unicode issues, including, utf-8 xterms from : - * - * http://www.cl.cam.ac.uk/~mgk25/unicode.html - * - */ - -const char *tests[] = -{ - "is is a test", "ISO-8859-1", - "Itrtinlation", "ISO-8859-1", - "Καλημέρα κόσμε", "UTF-8", - "コンニチハ", "UTF-8", - "ði ıntəˈnæʃənəl fəˈnɛtık əsoʊsiˈeıʃn", "UTF-8", - NULL -}; - - -int -main (int argc, char**argv) -{ - const char **b = tests; - while (*b) { - char *e = gmime_rfc2047_encode(b[0], b[1]); - printf("%s\t%s\n", e, gmime_rfc2047_decode(e, TERMINAL_CHARSET)); - b+=2; - } - - return 0; - -} diff --git a/tests/test8.c b/tests/test8.c deleted file mode 100644 index aa7debdba9..0000000000 --- a/tests/test8.c +++ /dev/null @@ -1,75 +0,0 @@ -/* test posix thread folder proxy */ - - -#include "camel.h" - -CamelThreadProxy *proxy; -CamelFuncDef *func_def; - - -void -test_sync_func (int num) -{ - printf ("Sync function number %d\n", num); - printf ("Sync function : current thread : %d\n", pthread_self ()); - -} - - -void -test_async_cb (int num) -{ - printf ("Callback number %d\n", num); - printf ("Callback : current thread : %d\n", pthread_self ()); -} - -void -test_async_func (int num) -{ - CamelOp *cb; - - printf ("Async function number %d\n", num); - printf ("Async function : current thread : %d\n", pthread_self ()); - sleep (1); - cb = camel_marshal_create_op (func_def, test_async_cb, num); - camel_thread_proxy_push_cb (proxy, cb); - - -} - -int -main (int argc, char **argv) -{ - int i; - CamelOp *op; - - camel_init (); - - func_def = - camel_func_def_new (camel_marshal_NONE__INT, - 1, - GTK_TYPE_INT); - - printf ("--== Testing Simple marshalling system ==--\n"); - for (i=0; i<5; i++) { - printf ("Iterration number %d\n", i); - op = camel_marshal_create_op (func_def, test_sync_func, i); - camel_op_run (op); - camel_op_free (op); - - } - printf ("\n\n"); - - proxy = camel_thread_proxy_new (); - - printf ("--== Testing Asynchronous Operation System ==--\n"); - for (i=0; i<5; i++) { - printf ("Pushing async operation number %d for execution\n", i); - op = camel_marshal_create_op (func_def, test_async_func, i); - camel_thread_proxy_push_op (proxy, op); - } - printf ("\n\n"); - printf ("--== Operations execution planned ==--\n"); - gtk_main (); -} - diff --git a/tests/test9.c b/tests/test9.c deleted file mode 100644 index 7fbbee8b8a..0000000000 --- a/tests/test9.c +++ /dev/null @@ -1,80 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ - -#include "camel.h" -#include "camel-mbox-folder.h" -#include "camel-mbox-parser.h" -#include "camel-mbox-utils.h" -#include "camel-mbox-summary.h" -#include "camel-exception.h" -#include -#include -#include -#include -#include -#include -#include - -int -main (int argc, char**argv) -{ - GArray *message_info_array; - gint test_file_fd; - CamelException *ex; - CamelMboxSummary *sum1, *sum2; - GArray *mbox_summary_info; - CamelMboxSummaryInformation *msg_info; - int i; - guint32 next_uid; - guint32 mbox_file_size; - - gtk_init (&argc, &argv); - camel_init (); - - ex = camel_exception_new (); - test_file_fd = open (argv[1], O_RDONLY); - message_info_array = camel_mbox_parse_file (test_file_fd, - "From ", - 0, - &mbox_file_size, - &next_uid, - TRUE, - NULL, - 0, - ex); - - close (test_file_fd); -#warning This test is no longer valid. -#if 0 - /* needs a folder to work with (indexing) */ - camel_mbox_write_xev (argv[1], message_info_array, &mbox_file_size, 1, ex); -#endif - if (camel_exception_get_id (ex)) { - printf ("Exception caught in camel_mbox_write_xev : %s\n", camel_exception_get_description (ex)); - } - - - mbox_summary_info = - parsed_information_to_mbox_summary (message_info_array); - sum1 = CAMEL_MBOX_SUMMARY (gtk_object_new (camel_mbox_summary_get_type (), NULL)); - - sum1->nb_message = mbox_summary_info->len; - - sum1->message_info = mbox_summary_info; - - camel_mbox_summary_save (sum1, "ev-summary.mbox", ex); - - sum2 = camel_mbox_summary_load ("ev-summary.mbox", ex); - - for (i=0; inb_message; i++) { - - msg_info = (CamelMboxSummaryInformation *)(sum1->message_info->data) + i; - printf ("Message %d :\n" - " From : %s\n", i, msg_info->headers.sender); - } - - return 1; - -} - - - diff --git a/tests/ui-tests/.cvsignore b/tests/ui-tests/.cvsignore deleted file mode 100644 index 84c2937bdc..0000000000 --- a/tests/ui-tests/.cvsignore +++ /dev/null @@ -1,8 +0,0 @@ -Makefile.in -Makefile -.deps -.libs -store_listing -msg-composer-test -message-browser -filter \ No newline at end of file diff --git a/tests/ui-tests/Makefile.am b/tests/ui-tests/Makefile.am deleted file mode 100644 index e61a054093..0000000000 --- a/tests/ui-tests/Makefile.am +++ /dev/null @@ -1,39 +0,0 @@ -# process this file with automake to create Makefile.in - -INCLUDES = \ - -I$(top_srcdir)/intl \ - -I$(top_srcdir)/camel \ - -I$(includedir) \ - -I$(top_srcdir)/camel/providers/MH \ - -I$(top_srcdir)/widgets \ - -I$(top_srcdir)/filter \ - $(EXTRA_GNOME_CFLAGS) $(BONOBO_GNOME_CFLAGS) \ - -DG_LOG_DOMAIN=\"evolution-ui-tests\" - -LDADD = \ - $(top_builddir)/widgets/libevolutionwidgets.la \ - $(top_builddir)/camel/libcamel.la \ - $(INTLLIBS) \ - $(EXTRA_GNOME_LIBS) \ - $(PTHREAD_LIB) - -message_browser_LDADD = \ - $(top_builddir)/camel/libcamel.la \ - $(INTLLIBS) \ - $(EXTRA_GNOME_LIBS) \ - $(PTHREAD_LIB) \ - $(EXTRA_GNOME_LIBS) \ - -lgtkhtml -lgnomeprint ../../mail/html-stream.o $(BONOBO_GNOME_LIBS) - -filter_LDADD = \ - $(top_builddir)/camel/libcamel.la \ - $(INTLLIBS) \ - $(EXTRA_GNOME_LIBS) \ - $(PTHREAD_LIB) \ - $(EXTRA_GNOME_LIBS) \ - $(top_builddir)/filter/libfilter.la \ - -lgtkhtml -lgnomeprint - -noinst_PROGRAMS = \ - message-browser \ - filter diff --git a/tests/ui-tests/filter.c b/tests/ui-tests/filter.c deleted file mode 100644 index 3ff6a1b1ae..0000000000 --- a/tests/ui-tests/filter.c +++ /dev/null @@ -1,30 +0,0 @@ - -#include -#include "filter-editor.h" - -int main(int argc, char **argv) -{ - GList *rules, *options, *options2; - xmlDocPtr doc, out, optionset, filteroptions; - GString *s; - GtkWidget *w; - - gnome_init("Test", "0.0", argc, argv); - gdk_rgb_init (); - gtk_widget_set_default_colormap (gdk_rgb_get_cmap ()); - gtk_widget_set_default_visual (gdk_rgb_get_visual ()); - - w = filter_editor_new(); - - doc = xmlParseFile("filterdescription.xml"); - rules = filter_load_ruleset(doc); - options = filter_load_optionset(doc, rules); - options2 = options; - out = xmlParseFile("saveoptions.xml"); - options = filter_load_optionset(out, rules); - - filter_editor_set_rules(w, rules, options2, options); - - gtk_widget_show(w); - gtk_main(); -} diff --git a/tests/ui-tests/filterdescription.xml b/tests/ui-tests/filterdescription.xml deleted file mode 100644 index 07c392aa70..0000000000 --- a/tests/ui-tests/filterdescription.xml +++ /dev/null @@ -1,99 +0,0 @@ - - - - - - (match-all (header-contains "From" ${sender})) - - The From address matches sender(s). - - - - - (match-all (header-contains "To" ${receipient})) - - The To address matches receipients. - - - - - (match-all (header-contains "CC" ${self-email})) - - I am in the cc list. - - - - - (& (> message-size (size-lower size-range)) - (< message-size (size-uppwer size-range))) - - The message is a certain size. - - - - - - - (copy-to ${folder}) - - Send a copy to folder. - - - - (forward-to ${address}) - - Forward the message to people. - - - - (delete) - - Delete message. - - - - (stop) - - Stop processing further rules for this message. - - - - - - - (match-all (not (header-contains "To" "zucchi@zedzone"))) - - When I am the receipient. - - - - - - - - -