diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/.cvsignore | 4 | ||||
-rw-r--r-- | tests/Makefile.am | 16 | ||||
-rw-r--r-- | tests/test1.c | 59 | ||||
-rw-r--r-- | tests/test2.c | 42 | ||||
-rw-r--r-- | tests/test3.c | 28 |
5 files changed, 0 insertions, 149 deletions
diff --git a/tests/.cvsignore b/tests/.cvsignore deleted file mode 100644 index 8cb5c0556b..0000000000 --- a/tests/.cvsignore +++ /dev/null @@ -1,4 +0,0 @@ -Makefile.in -Makefile -.deps -.libs diff --git a/tests/Makefile.am b/tests/Makefile.am deleted file mode 100644 index 5bfa054cbf..0000000000 --- a/tests/Makefile.am +++ /dev/null @@ -1,16 +0,0 @@ -# process this file with automake to create Makefile.in - -INCLUDES = -I$(top_srcdir)/intl -I$(top_srcdir)/camel \ - -I$(includedir) - -LDADD = \ - $(top_builddir)/camel/libcamel.la \ - $(GNOME_LIBDIR) \ - $(GNOMEUI_LIBS) $(INTLLIBS) -# $(BONOBO_LIBS) - -noinst_PROGRAMS = \ - test1 \ - test2 \ - test3 - diff --git a/tests/test1.c b/tests/test1.c deleted file mode 100644 index ecf155fcdc..0000000000 --- a/tests/test1.c +++ /dev/null @@ -1,59 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -#include "camel-mime-message.h" -#include "camel-mime-body-part.h" -#include "camel-multipart.h" -#include "stdio.h" -#include "camel-stream.h" -#include "camel-stream-fs.h" -#include "camel-log.h" -#include "camel.h" - -int -main (int argc, char**argv) -{ - CamelMimeMessage *message; - CamelMultipart *multipart; - CamelMimeBodyPart *body_part; - - /* FILE *output_file; */ - CamelStream *stream; - - gtk_init (&argc, &argv); - camel_init (); - message = camel_mime_message_new_with_session( (CamelSession *)NULL); - camel_mime_part_set_description (CAMEL_MIME_PART (message), "a test"); - camel_mime_part_add_header (CAMEL_MIME_PART (message), "X-test1", "the value of a test"); - camel_mime_part_add_header (CAMEL_MIME_PART (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_received_date (message, "Thu, 20 May 1999, 10:39:14 +0200"); - 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@inria.fr"); - - camel_mime_message_add_recipient (message, RECIPIENT_TYPE_TO, "franck.dechamps@alseve.fr"); - camel_mime_message_add_recipient (message, RECIPIENT_TYPE_TO, "mc@alseve.fr"); - camel_mime_message_add_recipient (message, RECIPIENT_TYPE_TO, "richard.lengagne@inria.fr"); - camel_mime_message_add_recipient (message, RECIPIENT_TYPE_CC, "Francois.fleuret@inria.fr"); - camel_mime_message_add_recipient (message, RECIPIENT_TYPE_CC, "maury@justmagic.com"); - camel_mime_message_add_recipient (message, RECIPIENT_TYPE_BCC, "Bertrand.Guiheneuf@aful.org"); - - - multipart = camel_multipart_new (); - body_part = camel_mime_body_part_new (); - camel_mime_part_set_text (CAMEL_MIME_PART (body_part), "This is a test.\nThis is only a test.\n"); - camel_multipart_add_part (multipart, body_part); - camel_mime_part_set_content_object (CAMEL_MIME_PART (message), CAMEL_DATA_WRAPPER (multipart)); - - stream = camel_stream_fs_new_with_name ("mail1.test", CAMEL_STREAM_FS_WRITE ); - if (!stream) { - CAMEL_LOG_FULL_DEBUG ("could not open output file"); - exit(2); - } - - camel_data_wrapper_write_to_stream (CAMEL_DATA_WRAPPER (message), stream); - camel_stream_close (stream); - - printf ("Test1 finished\n"); -} - diff --git a/tests/test2.c b/tests/test2.c deleted file mode 100644 index 154a243007..0000000000 --- a/tests/test2.c +++ /dev/null @@ -1,42 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* tests mime message file parsing */ -#include "gmime-utils.h" -#include "stdio.h" -#include "camel-log.h" -#include "camel-mime-message.h" -#include "camel-mime-part.h" -#include "camel-stream.h" -#include "camel-stream-fs.h" -#include "camel.h" - -void -main (int argc, char**argv) -{ - GHashTable *header_table; - CamelMimeMessage *message; - CamelStream *input_stream, *output_stream; - - gtk_init (&argc, &argv); - camel_init (); - camel_debug_level = CAMEL_LOG_LEVEL_FULL_DEBUG; - message = camel_mime_message_new_with_session( (CamelSession *)NULL); - - - input_stream = camel_stream_fs_new_with_name ("mail.test", CAMEL_STREAM_FS_READ); - if (!input_stream) { - perror ("could not open input file"); - printf ("You must create the file mail.test before running this test"); - exit(2); - } - - camel_data_wrapper_construct_from_stream ( CAMEL_DATA_WRAPPER (message), input_stream); - - camel_stream_close (input_stream); - - output_stream = camel_stream_fs_new_with_name ("mail2.test", CAMEL_STREAM_FS_WRITE); - camel_data_wrapper_write_to_stream (CAMEL_DATA_WRAPPER (message), output_stream); - camel_stream_close (output_stream); - - - -} diff --git a/tests/test3.c b/tests/test3.c deleted file mode 100644 index a210ea3723..0000000000 --- a/tests/test3.c +++ /dev/null @@ -1,28 +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_get_data_wrapper_type ("multipart"); - printf ("Type found %s\n", gtk_type_name (type) ); - - printf ("\nMime type : \"multipart/alternative\"\n"); - type = data_wrapper_get_data_wrapper_type ("multipart/alternative"); - printf ("Type found %s\n", gtk_type_name (type) ); - - printf ("\nMime type : \"toto/titi\"\n"); - type = data_wrapper_get_data_wrapper_type ("toto/titi"); - printf ("Type found %s\n", gtk_type_name (type) ); - - printf ("Test3 finished\n"); -} - |