diff options
author | Michael Zucci <zucchi@src.gnome.org> | 2000-04-27 06:07:04 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2000-04-27 06:07:04 +0800 |
commit | 10660e5e84f753e0fdeed4b97deabaea974c1d56 (patch) | |
tree | 8f91137490747553709ca24823218cde83e99a50 | |
parent | 9f81c2c796e9e93d643eed11d9e6f7d31a9eb4d8 (diff) | |
download | gsoc2013-evolution-10660e5e84f753e0fdeed4b97deabaea974c1d56.tar gsoc2013-evolution-10660e5e84f753e0fdeed4b97deabaea974c1d56.tar.gz gsoc2013-evolution-10660e5e84f753e0fdeed4b97deabaea974c1d56.tar.bz2 gsoc2013-evolution-10660e5e84f753e0fdeed4b97deabaea974c1d56.tar.lz gsoc2013-evolution-10660e5e84f753e0fdeed4b97deabaea974c1d56.tar.xz gsoc2013-evolution-10660e5e84f753e0fdeed4b97deabaea974c1d56.tar.zst gsoc2013-evolution-10660e5e84f753e0fdeed4b97deabaea974c1d56.zip |
Fix the changes to the tests
- open for write should use O_CREAT|O_TRUNC as well
- open for read should use mode 0
svn path=/trunk/; revision=2649
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | tests/test1.c | 6 | ||||
-rw-r--r-- | tests/test13.c | 4 | ||||
-rw-r--r-- | tests/test2.c | 4 |
4 files changed, 15 insertions, 7 deletions
@@ -1,3 +1,11 @@ +2000-04-26 NotZed <NotZed@HelixCode.com> + + * tests/test13.c (main): And here too. + + * tests/test2.c (main): Same here. + + * tests/test1.c (main): Change for removed simpledatawrapper. + 2000-04-26 Matt Loper <matt@helixcode.com> * tests/.cvsignore: Added test13. diff --git a/tests/test1.c b/tests/test1.c index f59439e9a7..29e5f1dac1 100644 --- a/tests/test1.c +++ b/tests/test1.c @@ -7,6 +7,7 @@ #include "camel-multipart.h" #include "camel-stream.h" #include "camel-stream-fs.h" +#include "camel-data-wrapper.h" #include "camel.h" int @@ -28,8 +29,7 @@ main (int argc, char**argv) attachment_stream = NULL; } else { if (argc == 2) { - attachment_stream = camel_stream_fs_new_with_name - (argv[1], O_RDONLY, 0600); + attachment_stream = camel_stream_fs_new_with_name (argv[1], O_RDONLY, 0); if (attachment_stream == NULL) { fprintf (stderr, "Cannot open `%s'\n", argv[1]); @@ -109,7 +109,7 @@ main (int argc, char**argv) camel_medium_set_content_object (CAMEL_MEDIUM (message), CAMEL_DATA_WRAPPER (multipart)); - stream = camel_stream_fs_new_with_name ("mail1.test", O_WRONLY, 0600); + stream = camel_stream_fs_new_with_name ("mail1.test", O_WRONLY|O_TRUNC|O_CREAT, 0600); if (!stream) { printf ("could not open output file"); exit(2); diff --git a/tests/test13.c b/tests/test13.c index a1978e7fb0..371b09c6fd 100644 --- a/tests/test13.c +++ b/tests/test13.c @@ -96,7 +96,7 @@ main (int argc, char**argv) message = camel_mime_message_new (); - input_stream = camel_stream_fs_new_with_name ("mail.test", O_RDONLY, 0600); + input_stream = camel_stream_fs_new_with_name ("mail.test", O_RDONLY, 0); if (!input_stream) { perror ("could not open input file\n"); printf ("You must create the file mail.test before running this test\n"); @@ -114,7 +114,7 @@ main (int argc, char**argv) camel_stream_close (input_stream); gtk_object_unref (GTK_OBJECT (input_stream)); - output_stream = camel_stream_fs_new_with_name ("mail2.test", O_WRONLY, 0600); + output_stream = camel_stream_fs_new_with_name ("mail2.test", O_WRONLY|O_CREAT|O_TRUNC, 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)); diff --git a/tests/test2.c b/tests/test2.c index 0424d1464e..fb7f1d4eb9 100644 --- a/tests/test2.c +++ b/tests/test2.c @@ -20,7 +20,7 @@ main (int argc, char**argv) message = camel_mime_message_new (); - input_stream = camel_stream_fs_new_with_name ("mail.test", O_RDONLY, 06000); + input_stream = camel_stream_fs_new_with_name ("mail.test", O_RDONLY, 0); if (!input_stream) { perror ("could not open input file\n"); printf ("You must create the file mail.test before running this test\n"); @@ -36,7 +36,7 @@ main (int argc, char**argv) 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|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)); |