aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test13.c
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2000-04-26 23:06:19 +0800
committerDan Winship <danw@src.gnome.org>2000-04-26 23:06:19 +0800
commit75a19475c9dc429e17019133eb8da387e96d04af (patch)
tree7c4f3ddedf7d53625248e79cfb260b572da5470d /tests/test13.c
parent85eafe5cb2cf0d6c5aeff0cd97840be7e3911b46 (diff)
downloadgsoc2013-evolution-75a19475c9dc429e17019133eb8da387e96d04af.tar
gsoc2013-evolution-75a19475c9dc429e17019133eb8da387e96d04af.tar.gz
gsoc2013-evolution-75a19475c9dc429e17019133eb8da387e96d04af.tar.bz2
gsoc2013-evolution-75a19475c9dc429e17019133eb8da387e96d04af.tar.lz
gsoc2013-evolution-75a19475c9dc429e17019133eb8da387e96d04af.tar.xz
gsoc2013-evolution-75a19475c9dc429e17019133eb8da387e96d04af.tar.zst
gsoc2013-evolution-75a19475c9dc429e17019133eb8da387e96d04af.zip
Update for the camel changes.
* tests: Update for the camel changes. * Makefile.am (SUBDIRS): Remove tests. They aren't terribly useful/interesting any more for the most part, and they frequently don't compile. svn path=/trunk/; revision=2636
Diffstat (limited to 'tests/test13.c')
-rw-r--r--tests/test13.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/tests/test13.c b/tests/test13.c
index 05277ae0ea..a1978e7fb0 100644
--- a/tests/test13.c
+++ b/tests/test13.c
@@ -37,8 +37,6 @@ dump_message_content(CamelDataWrapper *object)
} else if (CAMEL_IS_MIME_MESSAGE(containee)) {
dump_message_content((CamelDataWrapper *)containee);
} else {
- int total=0;
-
stream = camel_data_wrapper_get_output_stream(containee);
left = 0;
@@ -61,7 +59,6 @@ dump_message_content(CamelDataWrapper *object)
int
main (int argc, char**argv)
{
- GHashTable *header_table;
CamelMimeMessage *message;
CamelStream *input_stream, *output_stream;
CamelMimeParser *parser;
@@ -99,7 +96,7 @@ main (int argc, char**argv)
message = camel_mime_message_new ();
- input_stream = camel_stream_fs_new_with_name ("mail.test", CAMEL_STREAM_FS_READ);
+ input_stream = camel_stream_fs_new_with_name ("mail.test", O_RDONLY, 0600);
if (!input_stream) {
perror ("could not open input file\n");
printf ("You must create the file mail.test before running this test\n");
@@ -109,14 +106,15 @@ main (int argc, char**argv)
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(message, parser);
+ camel_mime_part_construct_from_parser(CAMEL_MIME_PART (message),
+ parser);
- dump_message_content(message);
+ dump_message_content(CAMEL_DATA_WRAPPER (message));
camel_stream_close (input_stream);
gtk_object_unref (GTK_OBJECT (input_stream));
- output_stream = camel_stream_fs_new_with_name ("mail2.test", CAMEL_STREAM_FS_WRITE);
+ output_stream = camel_stream_fs_new_with_name ("mail2.test", O_WRONLY, 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));