aboutsummaryrefslogtreecommitdiffstats
path: root/camel/tests
Commit message (Collapse)AuthorAgeFilesLines
* Treat spool as a local folder, so the ref checks work right.Not Zed2002-09-261-1/+1
| | | | | | | | | | | | 2002-09-26 Not Zed <NotZed@Ximian.com> * tests/folder/test2.c (main): Treat spool as a local folder, so the ref checks work right. * providers/local/camel-spool-store.c (get_folder): Use creat() instead of open() to create file. svn path=/trunk/; revision=18231
* Added a test suite for camel-mime-filter-charset and added a few test cases ↵Jeffrey Stedfast2002-09-268-11/+1059
| | | | | | for it. input charset files should be in the form "charset-%s.%d.in" where %s is the charset name that the file is in and %d is just some number as in a sequence id. Mostly just so we can have multiple test files per charset svn path=/trunk/; revision=18227
* New regression test for word splitting/search input parsing code.Not Zed2002-09-204-6/+120
| | | | | | | | | | | | | | | 2002-09-20 Not Zed <NotZed@Ximian.com> * tests/misc/split.c: New regression test for word splitting/search input parsing code. * tests/folder/test9.c (main): Fix for filter_driver api change. * camel-search-private.c (camel_search_words_split): Handle "'s and \'s to escape characters. For fat, lazy, slobs who dont like anything changing. svn path=/trunk/; revision=18130
* clear nonfatal stuff.Not Zed2002-09-046-33/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2002-09-04 Not Zed <NotZed@Ximian.com> * tests/folder/test4.c (main): clear nonfatal stuff. * tests/folder/test6.c (main): check inbox and 'another folder' because some servers do different things w/ inbox. * providers/imap/camel-imap-message-cache.c (camel_imap_message_cache_get): Dont try to open the directory instead of an empty "" uid. * providers/imap/camel-imap-folder.c (imap_get_message): we dont want to g_return_if_fail, we need to set an exception and always handle the case. (get_message_simple): Set an exception if we get a construct failure. (imap_refresh_info): if we're refreshing inbox, force a reselect. this is required for at least cryus. CHECK doesnt work either :( * tests/lib/folders.c (test_folder_basic): for non-local stores, the folder will have an extra ref for selection, take this into account when checking ref leaks. (test_folder_message_ops): Dont try to delete folder with messages in it, it works generally with imap. also, change params so we can test different mailbox types. (test_folder_message_ops): disconnect remote services before finishing off. doesn't need to stricly but makes ref count checking more accurate. (test_folder_message_ops): removed explicit remote sync, imap does it itself now ... * providers/imap/camel-imap-store.c: (camel_imap_store_finalize): call service_disconnect, so it isn't called later in the finalise chain, to properly cleanup on exit. svn path=/trunk/; revision=17962
* Change the case sensitive search of subject to expect case insensitiveNot Zed2002-08-291-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2002-08-29 Not Zed <NotZed@Ximian.com> * tests/folder/test3.c: Change the case sensitive search of subject to expect case insensitive results, as the behaviour has changed. (main): Made the search content before sync nonfatal. its something that needs to be fixed but not practical concern in evolution. * camel-block-file.c (block_file_validate_root): Only spit out the invalid root warnings if the file isn't empty. * camel-text-index.c (text_index_compress_nosync): Swap the path as well when we compress. * camel-mime-parser.c (folder_scan_content): Treat the end of file as a boundary if we're scanning From lines, and drop the last \n. (folder_scan_init_with_fd): Dont pre-read from the fd, and init eof. (folder_scan_init_with_stream): Similar. (folder_read): Handle eof, and set eof on 0 read. (folder_seek): Dont pre-read after a seek, and reset eof flag. (camel_mime_parser_init_with_fd): Fix doco, no pre-read occurs anymore. (camel_mime_parser_init_with_stream): Same. * providers/local/camel-mbox-summary.c (camel_mbox_summary_sync_mbox): Add a \n to end of content of each message, not at start. * providers/local/camel-mbox-folder.c (mbox_append_message): Instead of appending "\nFrom " to a mailbox, start with "From ", and append a \n after the message always. For better mutt/elm compatability. Also, unlock after we've stat'd. (mbox_append_message): Set the message's from_pos exactly as the mbox size. svn path=/trunk/; revision=17921
* updated readmeMichael Zucci2002-08-291-0/+1
| | | | svn path=/trunk/; revision=17919
* fix exposes a regression in mbox :-/Not Zed2002-08-281-5/+5
| | | | | | | | | | 2002-08-28 Not Zed <NotZed@Ximian.com> * tests/folder/test8.c (test_add_message): Change message number to use hex, so its properly unique. (worker): Same here. svn path=/trunk/; revision=17891
* some utf7/utf8 tests.Not Zed2002-08-282-2/+109
| | | | | | | | 2002-08-28 Not Zed <NotZed@Ximian.com> * tests/misc/utf7.c: some utf7/utf8 tests. svn path=/trunk/; revision=17890
* Don't register the noop timeout here anymore, we're gonna handle all thisJeffrey Stedfast2002-08-221-17/+0
| | | | | | | | | | | 2002-08-21 Jeffrey Stedfast <fejj@ximian.com> * camel-session.c (get_service): Don't register the noop timeout here anymore, we're gonna handle all this in the mailer now. (camel_session_register_timeout): Removed. (camel_session_remove_timeout): Removed. svn path=/trunk/; revision=17830
* Updated to pass the needed arguments to camel_init() and to init gthreadsJeffrey Stedfast2002-08-2031-357/+194
| | | | | | | | | | | | | | | | 2002-08-19 Jeffrey Stedfast <fejj@ximian.com> * tests/lib/camel-test.c (camel_test_init): Updated to pass the needed arguments to camel_init() and to init gthreads before camel (since camel expectes it to be initialised already). * tests/lib/session.c: #include <config.h> needed for ENABLE_THREADS so that sizeof (CamelSessionClass) gives the correct size. * tests/*: Updated to work with camel API changes. svn path=/trunk/; revision=17805
* Added a protocol field for users to use.Not Zed2002-05-311-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2002-05-30 Not Zed <NotZed@Ximian.com> * camel-cipher-context.h: Added a protocol field for users to use. * camel-stream-filter.c (do_read): Sigh, the pre-size is READ_PAD not READ_SIZE. Big difference. (READ_PAD): Bumped upto 128 from 64, so we can fit a typical line in full. * providers/imap/camel-imap-folder.c (get_content): Changed to load multipart/signed as an opaque block into the right kind of object. * camel-multipart.h (struct _CamelMultipart): Removed the boundary field. It wans't actually used anywhere. * camel-seekable-substream.c (camel_seekable_substream_new_with_seekable_stream_and_bounds): Shortened this stupidly long name to just :new(), its the only way its ever used. Fixed all callers. * camel-multipart-signed.[ch]: new wrapper for multipart/signed types. We need to treat the entire content as a blob of data for transport purposes. This also cleans up a lot of the sign/verify handling. * camel-mime-part-utils.c (camel_mime_part_construct_content_from_parser): Just call camel_multipart_construct_from_parser for multipart parts, also use a multipart_signed for multipart/signed types. * camel-multipart.c (camel_multipart_construct_from_parser): New virtual function for multiparts to buld themselves. (construct_from_parser): Implement for normal multiparts. (toplevel): Got rid of a warning, it'll never be an abstract class. * camel-pgp-context.c (pgp_hash_to_id): (pgp_id_to_hash): Implement. (camel_pgp_context_init): Init the pgp protocol specifier. * camel-cipher-context.c (camel_cipher_id_to_hash): (camel_cipher_hash_to_id): Util virtual methods to handle the cipher id string. * camel-mime-filter-canon.[ch]: A new filter, end/start of line canonicalisation filter. Can escape "From " and strip trailing whitespace, and canonicalise the end of line to crlf or to lf. 2002-05-29 Not Zed <NotZed@Ximian.com> * camel-multipart.h (struct _CamelMultipart): Removed the 'parent', nothing used it, anywhere. Cleaned up some formatting slightly. svn path=/trunk/; revision=17057
* Clean up some of the Makefiles so we dont' link every library multipleEttore Perazzoli2002-01-256-6/+6
| | | | | | times, causing big libtool 1.4 pain. svn path=/trunk/; revision=15461
* Pull up test fixes to get them building againJP Rosevear2001-07-219-12/+14
| | | | | | | | 2001-07-20 JP Rosevear <jpr@ximian.com> * Pull up test fixes to get them building again svn path=/trunk/; revision=11270
* Change a camel_exception_clear to camel_exception_init to fix aDan Winship2001-07-021-1/+1
| | | | | | | * tests/misc/url.c (main): Change a camel_exception_clear to camel_exception_init to fix a sometimes-crash svn path=/trunk/; revision=10675
* Build the test-crlf test program.Jeffrey Stedfast2001-06-305-2/+207
| | | | | | | | | | | | | | 2001-06-29 Jeffrey Stedfast <fejj@ximian.com> * tests/mime-filter/Makefile.am: Build the test-crlf test program. * tests/mime-filter/test-crlf.c: New test suite for the crlf filter. * camel-mime-filter-crlf.c (filter): Fixed to correctly encode and decode dots. svn path=/trunk/; revision=10602
* Add a CamelMimeFilterStripHeader that removes a header from mime output. UsedPeter Williams2001-06-2917-2/+264
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | by sendmail to strip the BCC from the email while still sending to the BCC recipients. camel: 2001-06-28 Peter Williams <peterw@ximian.com> * camel-mime-filter-stripheader.c: New file. Filter that strips a header from mime output. * camel-mime-filter-stripheader.h: New file. Header for the above. * providers/smtp/camel-smtp-transport.c (smtp_data): Use the stripheader filter to remove the "Bcc" header. * Makefile.am: Add the stripheader files. * tests/lib/Makefile.am (INCLUDES): Get this to compile again. * tests/mime-filter/test-stripheader.c: New file. Test suite for the CamelMimeFilterStripHeader. * tests/mime-filter/Makefile.am: New test section: mime filters. mail: 2001-06-28 Peter Williams <peterw@ximian.com> * mail-ops.c (mail_send_message): Revert fejj's Bcc header removal; this unsets the BCC recipients and so doesn't send to the Bcc'd people at all. svn path=/trunk/; revision=10576
* Updated to match the current API.Jeffrey Stedfast2001-06-282-3/+5
| | | | | | | | | | | 2001-06-27 Jeffrey Stedfast <fejj@ximian.com> * tests/folder/test9.c (main): Updated to match the current API. * tests/folder/test3.c: #include <gtk/gtk.h> since we use gtk_init(). svn path=/trunk/; revision=10546
* Remove DB3_LDADDDan Winship2001-06-195-6/+0
| | | | | | | | | | * tests/stream/Makefile.am (LDADD): * tests/smime/Makefile.am (LDADD): * tests/misc/Makefile.am (LDADD): * tests/message/Makefile.am (LDADD): * tests/folder/Makefile.am (LDADD): Remove DB3_LDADD svn path=/trunk/; revision=10272
* Only create a missing uid if we have indexing turned on.Not Zed2001-06-182-5/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-06-18 Not Zed <NotZed@Ximian.com> * camel-folder-summary.c (camel_folder_summary_info_new_from_parser): Only create a missing uid if we have indexing turned on. * camel-lock-helper.c (setup_process): Function to setup process/sanity/security checks. Change to the real uid as soon as we can. (lock_path): First try to lock as the real uid, if that fails, try the root uid. (unlock_id): Unlock as the uid we created the lock as. * Makefile.am (INCLUDES): Added -DCAMEL_SBINDIR for lock helper location. * providers/local/camel-spool-folder.c (spool_lock): Implemented, using lock helper locking. Need to work out if the locking requires a root created lock? (spool_unlock): Likewise. 2001-06-15 Not Zed <NotZed@Ximian.com> * camel-lock-helper.c: Setuid Lock helper process. Creates and manages .locks, keeping them active, removing them, etc. What real perms it needs is a little system dependent. 2001-06-14 Not Zed <NotZed@Ximian.com> * providers/local/camel-maildir-store.c (get_folder_info): Implement. (scan_dir): Does the work of scanning for maildir directories. 2001-06-13 Not Zed <NotZed@Ximian.com> * providers/local/camel-spool-store.c (get_folder_info): Implemented, just returns a hardcoded INBOX folder. (free_folder_info): implemented, free's the 1 possible level of folder info. * providers/local/camel-spool-folder.c (camel_spool_folder_construct): Set the real unread message count on the folder_created thing. svn path=/trunk/; revision=10261
* A new provider, for spool mailboxes. Mostly a cut and paste of the mboxNot Zed2001-06-1211-49/+69
| | | | | | | | | | | | | | | | | | | | | | | | | 2001-06-12 Not Zed <NotZed@Ximian.com> * providers/local/camel-spool-*.[ch]: A new provider, for spool mailboxes. Mostly a cut and paste of the mbox code, but not a subclass CamelLocal*. Not tested a lot, doesn't lock yet, use with extreme caution. * tests/lib/folders.c (test_folder_message_ops): Added spool arg, spool folders can't be deleted, renamed, etc. (test_folder_basic): Same. * tests/folder/test2.c (main): Added checks for spool type. * tests/[message|stream|folder|misc|smime]/Makefile.am (LDADD): Added db3 flags, so make check compiles, doesn't run though. 2001-05-24 Not Zed <NotZed@Ximian.com> * providers/local/camel-local-provider.c (camel_provider_module_init): Added spool provider. svn path=/trunk/; revision=10198
* Fix to not get into a recursive loop in get_type().Jeffrey Stedfast2001-06-033-41/+42
| | | | | | | | | | | 2001-06-01 Jeffrey Stedfast <fejj@ximian.com> * tests/smime/pgp.c: Fix to not get into a recursive loop in get_type(). * tests/smime/pgp-mime.c: Same. svn path=/trunk/; revision=10102
* Fix an fd leakDan Winship2001-05-2818-645/+117
| | | | | | | | | | | | | | | | | | | | | | * tests/lib/messages.c (test_message_read_file): Fix an fd leak * tests/lib/session.c, tests/lib/session.h: a CamelSession subclass for the test programs. * tests/lib/Makefile.am: include session.[ch] * tests/folder/test*.c: Use a CamelTestSession from libcameltest instead of cut+pasting everywhere. * tests/misc/url.c (main): Update for a camel_url_new change at some point. * tests/*/.cvsignore: Add stuff. * camel-mime-utils.c (rfc2047_encode_word): Fix a silly ==/!= mixup. svn path=/trunk/; revision=10023
* Don't use EXTRA_GNOME_*, use the new CAMEL_* variables so we don't link inJeffrey Stedfast2001-05-161-1/+1
| | | | | | | | | | 2001-05-15 Jeffrey Stedfast <fejj@ximian.com> * Makefile.am: Don't use EXTRA_GNOME_*, use the new CAMEL_* variables so we don't link in tons of extra cruft that we don't need. svn path=/trunk/; revision=9821
* Added t the test suite - tests the S/MIME pkcs7 functions.Jeffrey Stedfast2001-05-162-2/+181
| | | | | | | | | 2001-05-15 Jeffrey Stedfast <fejj@ximian.com> * tests/smime/pkcs7.c: Added t the test suite - tests the S/MIME pkcs7 functions. svn path=/trunk/; revision=9818
* Subclass CamelSession since we can no longer specify the passwd callbackJeffrey Stedfast2001-05-1511-89/+711
| | | | | | | | | | | | | | | | | | | | 2001-05-14 Jeffrey Stedfast <fejj@ximian.com> * tests/folder/test9.c: * tests/folder/test8.c: * tests/folder/test7.c: * tests/folder/test6.c: * tests/folder/test5.c: * tests/folder/test4.c: * tests/folder/test3.c: * tests/folder/test2.c: * tests/folder/test1.c: * tests/smime/pgp-mime.c: * tests/smime/pgp.c: Subclass CamelSession since we can no longer specify the passwd callback any other way and update code accordingly. svn path=/trunk/; revision=9796
* Remove UNICODE_CFLAGS (and some other stuff that's redundant withDan Winship2001-04-271-13/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Makefile.am (INCLUDES): Remove UNICODE_CFLAGS (and some other stuff that's redundant with EXTRA_GNOME_CFLAGS) (libcamel_la_LIBADD): Replace UNICODE_LIBS with GAL_LIBS. * camel-search-private.c: * camel-pgp-context.c: * camel-mime-utils.c: Use gunicode interfaces rather than libunicode. * camel-charset-map.c: Use gunicode rather than libunicode. (The charmap-regen code still depends on libunicode though.) * camel-mime-filter-charset.h: * tests/message/test2.c (convert): Use iconv rather than unicode_iconv. * providers/smtp/Makefile.am (libcamelsmtp_la_LIBADD): * providers/pop3/Makefile.am (libcamelpop3_la_LIBADD): * providers/local/Makefile.am (libcamellocal_la_LIBADD): Remove UNICODE_LIBS. * camel.c (camel_init): Remove call to unicode_init. * camel-mime-parser.c: Remove unused unicode.h include. svn path=/trunk/; revision=9585
* Oops, lets not get into a recursive call here ;-)Jeffrey Stedfast2001-04-132-8/+8
| | | | | | | | | | | | | 2001-04-12 Jeffrey Stedfast <fejj@ximian.com> * camel-pgp-context.c (camel_pgp_context_get_type): Oops, lets not get into a recursive call here ;-) * tests/smime/pgp.c: Updated to reflect changes to the PGP code. * tests/smime/pgp-mime.c: Same. svn path=/trunk/; revision=9287
* Added pgp-mime.c to the tests.Jeffrey Stedfast2001-04-123-5/+105
| | | | | | | | | | | | | | | | 2001-04-11 Jeffrey Stedfast <fejj@ximian.com> * tests/smime/Makefile.am: Added pgp-mime.c to the tests. * tests/smime/pgp-mime.c: Test suite for camel-pgp-mime.c functions. * Makefile.am: Add camel-pgp-mime.[c,h] to the build. * camel-pgp-mime.c: Made a number of fixes to get it to compile and also fixed a few logic errors (mostly forgetting to reset streams) so that it worked (thanks to the pgp-mime test program). svn path=/trunk/; revision=9247
* Added camel-pgp-context.[c,h] to the build. Also added tests/smime/pgp.cJeffrey Stedfast2001-04-105-1/+139
| | | | | | | | | | | | | 2001-04-06 Jeffrey Stedfast <fejj@ximian.com> * Makefile.am: Added camel-pgp-context.[c,h] to the build. Also added tests/smime/pgp.c and Makefile.am * tests/smime/pgp.c: New test suite for PGP functions. * camel-pgp-context.c: Various fixes to get it to build. svn path=/trunk/; revision=9213
* change "gboolean show_passwd" to "guint32 flags".Dan Winship2001-03-301-2/+2
| | | | | | | | | | | | | | | | | | * camel-url.c (camel_url_to_string): change "gboolean show_passwd" to "guint32 flags". * tests/misc/url.c (main): Update calls to camel_url_to_string * providers/imap/camel-imap-store.c (construct): Call camel_url_to_string with flags to hide password, authtype, and params to create the base_url. (etc): Update for the fact that the base_url no longer has the "/" at the end. * camel-service.c (construct): Update calls to camel_url_to_string (pass CAMEL_URL_HIDE_PASSWORD) svn path=/trunk/; revision=9014
* New URL parser with full RFC1808 relative URL support. Yum.Dan Winship2001-03-265-2/+139
| | | | | | | | | | | | | | | | * camel-url.c (camel_url_new_with_base): New URL parser with full RFC1808 relative URL support. Yum. (camel_url_new): Wrapper around camel_url_new_with_base now. Removed the CamelException since no one ever used it... * tests/Makefile.am: add misc subdir * tests/misc/url.c: relative URL test cases from RFC 1808 * camel-session.c (camel_session_get_service): Update camel_url_new call. svn path=/trunk/; revision=8933
* Added more test rules.Jeffrey Stedfast2001-02-082-0/+3
| | | | svn path=/trunk/; revision=8102
* Changed the subject search to handle case sensitive when it is mixed case.Not Zed2001-01-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-01-25 Not Zed <NotZed@Ximian.com> * tests/folder/test3.c: Changed the subject search to handle case sensitive when it is mixed case. * Makefile.am (libcamel_la_SOURCES): Added camel-ssearch-private.c (noinst_HEADERS): Added camel-search-private.h * camel-folder-search.c (check_header): New function to do the work of the various header checks. (search_header_matches): (search_header_starts_with): (search_header_ends_with): (search_header_contains): Use check_header to do the work. (build_match_regex): Removed. * camel-search-private.c (header_soundex): New function to match words to phrases using soundex algorithm. * camel-filter-search.c (soundexcmp): Removed. (check_match): Moved to search-private.h 2001-01-24 Not Zed <NotZed@Ximian.com> * camel-search-private.c (camel_search_build_match_regex): Added extra flags, so the same function can be used for start/end/whole/partial matches. (camel_search_header_match): Convenience function to check a single header against all sorts of different matches. * providers/imap/camel-imap-search.c (imap_body_contains): Fix for e_sexp api changes. * camel-folder-search.c: Fix for e_sexp api changes. (search_header_contains): Free args/quit on unknown header. (search_header_matches): " (search_header_starts_with): " (search_header_ends_with): " (match_message): Add an exception argument. (search_body_contains): Free args/quit on fatal error. (message_body_contains): Removed (moved to camel-search-private.c), fixed callers. * camel-filter-search.c: Fix for e_sexp api changes. (build_match_regex, message_body_contains): Moved into camel-filter-private.c Fixed callers. (check_header): moved guts to camel-search-private, and changed to use regex's for everything. Just calls that with the right args. (check_header): GEts the header, decodes it, and checks for failure, and whatnot. (check_match): Removed. (header_soundex): Changed significantly. Now it soundexes each word in the header separately, and compares it to the first argument. * tests/folder/test9.c (main): Fix for api changes. (main): Added tests to see that invalid match and action rules are properly detected. * camel-filter-driver.c (camel_filter_driver_filter_mbox): Remove the 'finished message' bit. (camel_filter_driver_filter_message): Remove an accidentally checked in debug. (camel_filter_driver_filter_message): Fix for e-sexp api changes. svn path=/trunk/; revision=7796
* Added tests to see that invalid match and action rules are properlyNot Zed2001-01-241-0/+57
| | | | | | | | | | 2001-01-24 Not Zed <NotZed@Ximian.com> * tests/folder/test9.c (main): Added tests to see that invalid match and action rules are properly detected. svn path=/trunk/; revision=7767
* Fix for api changes.Not Zed2001-01-241-3/+3
| | | | | | | | 2001-01-24 Not Zed <NotZed@Ximian.com> * tests/folder/test9.c (main): Fix for api changes. svn path=/trunk/; revision=7765
* Added profiling temp files.Not Zed2001-01-225-1/+16
| | | | | | | | | 2001-01-22 Not Zed <NotZed@Ximian.com> * .cvsignore */*/.cvsignore: Added profiling temp files. svn path=/trunk/; revision=7705
* Index: ChangeLogMichael Zucci2001-01-176-8/+195
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Index: ChangeLog =================================================================== RCS file: /cvs/gnome/evolution/camel/ChangeLog,v retrieving revision 1.684 diff -r1.684 ChangeLog 0a1,34 > 2001-01-17 Not Zed <NotZed@Ximian.com> > > * camel-folder.c (free_summary): Call > camel_folder_summary_array_free() to do the work. > (get_summary): Use camel_folder_summary_array() to get the array > atomically. These fixes allow folder/test8 to work again, and fix > a sort of race where the summary size can change while we were > making a copy of it. > > * camel-folder-summary.c (camel_folder_summary_array): Get the > summary array atomically, so it can't contain empty records. > (camel_folder_summary_array_free): And free it. > > * tests/lib/camel-test.c (die): If we are verbose & in threads, > then goto sleep so we can debug. > > * tests/folder/test8.c (worker): Add a missing pull() for > comnparing content. > > * camel-filter-search.c: Fix the symbol table, so match-all is an > immediate function, as it should be. > > * tests/folder/test9.c (main): New test, tests some filtering > things. > > * tests/message/test3.c (main): Dont use a boundary string with > spaces in it. Folding can corrupt it. Maybe the folding isn't > working entirely right, but anyway. > > * camel-session.c: Debug out the debug. > > * camel-filter-driver.c (camel_filter_driver_filter_folder): Plug > a messageinfo leak. > 1a36,94 > > * camel-filter-search.c (header_exists): Changed to support > multiple args (or'd together). > (header_contains): Cleaned up to match the search code. Why did > fejj change it? I'll never know. > (header_matches): > (header_starts_with): > (header_ends_with): Big cleanup of fejj's "i'm the cut & paste > king" code. Also properly handle or'ing of additional args to > match what the folder-search code should do. > (check_match): New function which does the annoying matching > stuff (for header matches). > (check_header): Similarly, handles or'ing of the matches together. > (header_contains): > (header_matches): > (header_starts_with): > (header_ends_with): Call check_header to do the actual work. > (header_soundex): And here too. > (match_all): Yeah like match-all isn't passed expression results, > its passed expression terms. Fix this so match-all works like it > should, by executing the contained expression. > (message_body_contains): Copied directly from > camel-folder-search.c, a more robust/faster/simpler body search > code. > (mime_part_matches): Removed entirely. > (handle_multipart): Removed entirely. > (build_match_regex): Copied from camel-folder-search. Builds a > set of simple strings into a regex pattern that matches any of > them (for faster & simpler matching). Expanded to accept regex > patterns itself, so it can merge them together. > (body_contains): Use build match/match message to match using a > built regex. > (body_regex): Likewise, this time we tell it we're building a > regex though. > (header_full_regex): Use build_match_regex to take the drudgery > out of it, and expand it to handle multiple regex's at once. > (get_full_header): slightly cleaner (well i dunno, the sprintf > stuff just got to me). > (header_regex): Cleaned up to use build_match_Regex too, and to > properly check types. > (filter_message_search): Just allocate 'fms' on the stack. > > * camel-filter-driver.c (camel_filter_driver_finalise): > (camel_filter_driver_init): > (camel_filter_driver_class_init): > (camel_filter_driver_get_type): Changed from gtk object to camel > object. > (camel_filter_driver_add_rule): New function to add a rule to be > processed in sexp form. > (camel_filter_driver_init): Init the rules list. > (camel_filter_driver_finalise): Clear the rules/rules list. > (camel_filter_driver_filter_message): Scan rules list directly > rather than creating on the fly. > > * Makefile.am (libcamelinclude_HEADERS): Added camel-filter-driver.h > (libcamel_la_SOURCES): Added camel-filter-driver.c, code taken > from filter-driver, which can drive, uh, filters based on sexp's. > (libcamelinclude_HEADERS): > (libcamel_la_SOURCES): Added camel-filter-search.[ch] svn path=/trunk/; revision=7560
* fix includes for compilationJP Rosevear2001-01-059-5/+17
| | | | | | | | | | | | | | | | | | | | | | 2001-01-04 JP Rosevear <jpr@helixcode.com> * tests/lib/Makefile.am: fix includes for compilation * tests/message/Makefile.am: Build test3 again * tests/message/test2.c: Kill warnings with header includes * tests/message/test3.c: ditto * tests/lib/streams.c: ditto * tests/lib/camel-test.c: ditto * tests/lib/messages.c: ditto * tests/lib/folders.c: ditto svn path=/trunk/; revision=7253
* Lock the command channel while searching. (imap_body_contains): IfNot Zed2000-12-245-57/+380
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2000-12-24 Not Zed <NotZed@HelixCode.com> * providers/imap/camel-imap-search.c (imap_body_contains): Lock the command channel while searching. (imap_body_contains): If performing a whole uid search, then add references to our own summary items, dont look it up in the folder. This way they can't vanish unexpectedly. * providers/imap/camel-imap-folder.h (CamelImapFolder): Added a private field. * providers/imap/camel-imap-private.h: Added lock for imap searches. * Merge from camel-mt-branch. * providers/imap/camel-imap-folder.c (imap_update_summary): Merge fix, use the folder->summary. (imap_get_message_flags, imap_set_message_flags, imap_get_message_user_flag, imap_set_message_user_flag): Removed again. (camel_imap_folder_init): Setup private data/lock. (imap_finalize): Free private data/search lock. (imap_search_free): Lock the search_lock. (imap_search_by_expression): Lock the search lock when using the search object. Also copy/ref hte summary, rather than getting it directly. (imap_refresh_info): Free any info lookups. Use folder->summary not imap_folder->summary. And lock around commands. svn path=/trunk/; revision=7150
* Add missing .h file. (From campd.)Dan Winship2000-12-131-6/+2
| | | | | | * tests/lib/Makefile.am: Add missing .h file. (From campd.) svn path=/trunk/; revision=6951
* oopsMichael Zucci2000-12-091-0/+198
| | | | svn path=/trunk/; revision=6864
* ShushJP Rosevear2000-12-091-0/+7
| | | | svn path=/trunk/; revision=6863
* Remove test3 from build until the files show upJP Rosevear2000-12-091-3/+2
| | | | | | | | | | | | | | 2000-12-08 JP Rosevear <jpr@helixcode.com> * tests/message/Makefile.am: Remove test3 from build until the files show up 2000-12-08 JP Rosevear <jpr@helixcode.com> * Makefile.am: Remove files from extra_dist since they are already listed svn path=/trunk/; revision=6861
* Change line no format so that emacs can detect it.Not Zed2000-12-083-4/+7
| | | | | | | | | 2000-12-06 Not Zed <NotZed@HelixCode.com> * tests/lib/camel-test.h (check): Change line no format so that emacs can detect it. svn path=/trunk/; revision=6848
* Stream testing stuff.Michael Zucci2000-12-053-0/+258
| | | | svn path=/trunk/; revision=6792
* stream_flush does make sense for a substream afterall (if you have aNot Zed2000-12-056-2/+301
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2000-12-05 Not Zed <NotZed@HelixCode.com> * camel-seekable-substream.c (stream_flush): stream_flush does make sense for a substream afterall (if you have a stream_write). (stream_write): Implement this. (stream_seek): Change the STREAM_END behaviour to be more sane. if bounded go from the end of the bound, if unbounded, go from the end of the parent stream. * camel-stream-mem.c (stream_read): Dont return error if reading past the end of data, just return 0. * camel-stream-fs.c (camel_stream_fs_init): Initialise the stream to be unbound. (stream_seek): Fix the logic when seeking from the end of an unbounded stream. (camel_stream_fs_new_with_fd): If the fd is invalid (-1), then return NULL immediately. (stream_seek): Range check a SEEK_END so it fits within bound_start. 2000-12-01 Not Zed <NotZed@HelixCode.com> * tests/lib/folders.c (test_folder_basic): New test to perform basic store operations on folders (taken from folders/test1). (test_folder_message_ops): Tkane the guts out of folders/test2. svn path=/trunk/; revision=6790
* added some imap tests, tho they dont get far yet and dontMichael Zucci2000-12-0410-291/+654
| | | | | | recover automatically. svn path=/trunk/; revision=6772
* Remove assertion that content is there, when it no longer can be.Not Zed2000-11-302-9/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2000-11-30 Not Zed <NotZed@HelixCode.com> * providers/local/camel-mbox-folder.c (mbox_get_message): Remove assertion that content is there, when it no longer can be. * camel-folder-summary.h: Removed pos/bodypos/endpos from camelmeessagecontentinfo. (CamelMessageFlags): Added an attachments flag. * providers/local/camel-local-summary.h: Added load virtual function. * tests/lib/folders.c (test_message_info): Accessors. (test_folder_message): " * camel-folder-thread.c (get_root_subject): Fix accessors. (dump_tree_rec): " * camel-folder-search.c (camel_folder_search_execute_expression): Accessors for messageinfo. (search_match_all): " (search_header_contains): " (search_header_contains): " (search_body_contains): " (camel_folder_search_execute_expression): Use mepool_strdup. * providers/local/camel-mbox-summary.c (summary_update): Accessors for messageinfo. (mbox_summary_sync_full): " * providers/local/camel-mh-summary.c (remove_summary): Accessors for messageinfo. (mh_summary_check): " (mh_summary_sync_message): " (mh_summary_sync): " * providers/local/camel-mh-folder.c (mh_append_message): Use accessor for uid. * providers/local/camel-local-summary.c (local_summary_decode_x_evolution): Use accessor to uid. (local_summary_encode_x_evolution): Likewise. (message_info_new): And here. (camel_local_summary_load): Call virtual load function. (local_summary_load): Default load function, load summary. (camel_local_summary_load): Check file exists before trying to load. (camel_local_summary_construct): Turn off building content info! (CAMEL_LOCAL_SUMMARY_VERSION): Bump, since we dont build content info anymore. (camel_local_summary_load): After a successful load/check, do a save too so we dont have to go through it again randomly. * providers/nntp/camel-nntp-utils.c (get_XOVER_headers): Use accessors for messageinfo. * providers/nntp/camel-nntp-folder.c (nntp_folder_get_uids): Use accessors for uid. * providers/imap/camel-imap-folder.c (imap_refresh_info): Use accessor for uid. (imap_sync): Likewise. (imap_get_uids): Likewise. (imap_update_summary): And here. * providers/vee/camel-vee-folder.c (vfolder_remove_match): Use accessor for uid. (vfolder_add_match): Handle estrv stuff. (vfolder_change_match): Accessor for uid. (get_real_message): " (vee_get_uids): " (vee_folder_build): " + estrv. (vee_folder_build_folder): " * providers/local/camel-maildir-folder.c (maildir_append_message): Use acccessors for uid's. (maildir_get_message): Here too. * providers/local/camel-maildir-summary.c (camel_maildir_summary_init): Setup the string count for us. (message_info_new): Access the string array directly. (message_info_free): No need to free string if using array. (camel_maildir_summary_info_to_name): Use accessor to get to uid. (remove_summary): And here. (maildir_summary_check): Likewise. (maildir_summary_sync): And here. (maildir_summary_load): Load up a cache of uid->filename mappings before loading the actual summary file. This saves us having to waste the diskspace storing the filenames in the summary itself, and also helps us sync the summary better on load. (message_info_load): If we have the load_map setup, and the uid exists, then set the filename cache from it, and update the flags from the name, incase our summary mismatches it. * camel-folder-summary.c (camel_folder_summary_init): Setup string count for compressed info record. An optional compile mode which stores all strings for a given messageinfo into a packed array, which should save 36-50 bytes/record. (camel_folder_summary_info_new): Init the string array. (message_info_new): Set the string array items, as required. (message_info_load): And here too. (message_info_save): Use accessors to get to strings. (message_info_free): Free strings as one. (camel_message_info_dup_to): Handle packed array case. (camel_folder_summary_add): Use accessors. And pack the strv before storing it. (summary_assign_uid): New function to assign a unique uid to a message, if it doesn't have one. (camel_folder_summary_add): Call assign_uid instead of doing it ourselves. (camel_folder_summary_info_new_from_parser): " (camel_folder_summary_info_new_from_message): " (camel_folder_summary_encode_string): constify. (camel_folder_summary_encode_token): " (summary_build_content_info_message): Fix accessors to messageinfo. (CAMEL_FOLDER_SUMMARY_VERSION): Bumped, for removal of contentinfo->pos data. (camel_folder_summary_info_new_from_parser): Calculate the size based on the parser position, not the removed contentinfo stuff. (camel_folder_summary_info_new_from_message): Remove size stuff. (camel_folder_summary_offset_content): Removed, no longer means anything. (content_info_new): (content_info_load): (content_info_save): (summary_build_content_info): Remove stuff for contentinfo->pos*. (summary_build_content_info): Take a msginfo argument, set attachments flag if we find any attachments. (summary_build_content_info_message): set attachments flag if we find any attachments. (camel_folder_summary_info_new_from_parser): Always scan the content info, even if we dont save it. (camel_folder_summary_info_new_from_message): And here too. (summary_build_content_info): Only create the contentinfo stuff if we have it turned on, otherwise just parse and discard. (summary_build_content_info_message): Likewise. svn path=/trunk/; revision=6731
* Builddir != srcdir loving.Ettore Perazzoli2000-11-291-0/+2
| | | | svn path=/trunk/; revision=6712
* Add a missed unref.Not Zed2000-11-297-88/+167
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2000-11-29 Not Zed <NotZed@HelixCode.com> * tests/message/test2.c (main): Add a missed unref. * camel-stream-mem.c (camel_stream_mem_set_buffer): We must set ourselves as the owner of the byte-array. Weird, someone has modified this file (its been reindented), but i can't see any changelogs ... * tests/lib/messages.c (content_finalise): Fix memleak in tester, free byte array when our content object is deleted. * camel-folder-search.c (camel_folder_search_finalize): Yeah great, so the sexp is a gtk object, not a camel object. Isn't that going to be fun to fix? * camel-session.c (camel_session_finalise): Free the storage path. * providers/local/camel-local-store.c (camel_local_store_init): If store->folders is setup, free it first, then overwrite. Hmm, this seems a bit crappy to me. * camel-store.c (camel_store_init): Dont setup store->folders if its already setup. * camel-exception.c (camel_exception_setv): Removed a memleak. no need to strdup after a strdup_printf!!! * camel-address.c (camel_address_finalize): Free the address ptrarray, once finished. * providers/local/camel-local-folder.c (local_finalize): Make sure we dont leave the folder locked on close. (local_finalize): Free summary/search. * providers/local/camel-mh-summary.c (mh_summary_next_uid_string): Small memleak, always free name after using it. * camel-mime-part.c (set_content_object): Free txt after setting the header. * providers/local/camel-maildir-summary.c (maildir_summary_check): Fix a memleak, close the dir after scanning new. (message_info_free): Added so we can free the filename cached in the messageinfo. (camel_maildir_summary_finalise): Free the hostname. * tests/folder/test[12].c (main): Clear out camel-test before starting. * providers/local/camel-mbox-summary.c (mbox_summary_sync_quick): Because encode_x_evolution folds the line (sigh, because encode_param does, unlike every other function in camel-mime-utils), unfold the encoded result before comparing. (mbox_summary_sync_quick): Another small memleak, free xevnew once finished with it. * camel-mime-utils.c (header_decode_quoted_string): Removed a redundant check for c=0. (header_unfold): New function to un-fold headers. * providers/local/camel-local-summary.c (local_summary_encode_x_evolution): some problems with encoding tags, using the wrong output strings. (local_summary_encode_x_evolution): We dont need to append a ; either, param_list_format_append() will do it for us. ` svn path=/trunk/; revision=6711
* ShushJP Rosevear2000-11-294-0/+32
| | | | svn path=/trunk/; revision=6709
* Set the info size's properly, oops!Not Zed2000-11-2811-2/+915
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2000-11-28 Not Zed <NotZed@HelixCode.com> * providers/local/camel-maildir-summary.c (camel_maildir_summary_init): Set the info size's properly, oops! * tests/lib/folders.[ch]: Folder testing helpers. * tests/folder/test2.c: Test basic message ops on folders. * tests/folder/test1.c (main): Test basic folder ops on (local) stores. * providers/local/camel-local-provider.c (camel_provider_module_init): Removed some debug. * providers/local/camel-maildir-folder.c (camel_maildir_folder_class_init): fix parent class. * providers/local/camel-mh-folder.c (camel_mh_folder_class_init): Fix parent class (damn cut & paste). * providers/local/camel-maildir-store.c (get_folder): Call parent impl. (camel_maildir_store_class_init): Fix parent class setup. (delete_folder): Check the folder exists before trying to delete it. (delete_folder): Try and make the delete operation atomic/rollback failures. e.g. if one directory isn't empty, then create the other empty ones back. Also clear the tmp directory fully first. * providers/local/camel-mbox-store.c (get_folder): Call parent impl. (camel_mbox_store_class_init): parent class is camel_local_store, not camel_folder, oops. (delete_folder): Return an error if it doesn't exist, rather than covering it up. * providers/local/camel-mh-store.c (get_folder): Call parent impl. (camel_mh_store_class_init): fix parent class setup. (delete_folder): Error if it doesn't exist now. * camel-folder.c (camel_folder_move_message_to): (camel_folder_copy_message_to): Added warnings as these functions are going to be removed later. * camel-store.c (camel_store_get_root_folder): Fix for an early api change. We want CAMEL_STORE_FOLDER_CREATE, not TRUE, since its a flag. (camel_store_get_default_folder): And here too. * providers/local/camel-local-store.c (xrename): Handle renaming folders differently to renaming files. (get_default_folder_name): local stores dont have a default folder, so make it so. Or at least, it doesn't seem to make sense to have one. (get_root_folder_name): Same for root. (get_folder): Added parent implementation, that makes sure the service path exists, if we are creating a new folder (but doesn't create the folder). 2000-11-27 Not Zed <NotZed@HelixCode.com> * providers/local/camel-local-store.c (xrename): Fixed races. Use link/unlink, rather than rename, to properly detect overwriting another file. And allow some files to be missing. * providers/Makefile.am: Removed mh, mbox, added local, to the default. svn path=/trunk/; revision=6693
* little util to scan mailboxes for any and every address they contain.Michael Zucci2000-11-245-47/+166
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * tests/data/getaddr.pl: little util to scan mailboxes for any and every address they contain. * tests/message/test2.c (main): Added a bunch of stuff to test decoding/reencoding/etc of internationalised addresses. * tests/message/lib/address-data.h: Copy of some unicode/other testing data. **Beware** of editing this file in emacs, it'll probably try and convert all the characters to something unusable. * tests/lib/camel-test.c (camel_test_break): Add a debugger hook point. * camel-mime-utils.c (quoted_encode): Check for space and convert to _ separately. (header_decode_mailbox): Fixed the 'check comments for realname' code, problem was the domain getting code was skipping all whitespace/comments before we could get a look-in. This is approximate but fairly robust. (header_decode_text): Dont use the c-type isspace func here, we want a specific whitespace only. (header_decode_text): If we have decoded words next to each other, do not insert whitespaces between them, which is what rfc2047 requires. (header_decode_text): Make c unsigned too. svn path=/trunk/; revision=6658
* Added at least some explanation of all this stuff.Not Zed2000-11-243-12/+70
| | | | | | | | | | | | | 2000-11-24 Not Zed <NotZed@HelixCode.com> * tests/README: Added at least some explanation of all this stuff. * tests/lib/camel-test.h (check_msg): Added a non-gcc version of the fail command, we dont get the expression that failed, but no matter. Should be (more) portable now. (check, check_msg): Put the file/lineno in the default message. svn path=/trunk/; revision=6657
* Add tests.Not Zed2000-11-2413-0/+1203
2000-11-24 Not Zed <NotZed@HelixCode.com> * Makefile.am (SUBDIRS): Add tests. * camel-mime-filter-basic.c (filter): Well, I'll add the extra bytes here too, lathough not strictly needed, might save a re-malloc when we get to complete(). * camel-mime-filter-charset.c (filter): Make sure we have room if we only convert very short data. (complete): and here too. * tests/Makefile.am: Initial test harness & tests. Requires gcc for this. * camel-internet-address.c (d): Turn off debug. * camel-charset-map.c (camel_charset_step): Oops, & masks for set intersection, not | them. Dunno how this got even close to working. 2000-11-23 Not Zed <NotZed@HelixCode.com> * camel-mime-filter-basic.c (filter): For base64 encoding, the output size for 0, 1, or 2 bytes of input can exceed input*2, so make sure we account for that as well. (complete): And here. (complete): Similarly for qp encoding, if we have a trailing space, we need some extra bytes (not needed for 'filter()', as any such bytes are stored in state/save). * camel-mime-utils.c (quoted_decode_step): Removed fixme not required. (quoted_encode_close): Dont append a trailing afterall. Otherwise a pass through the encode/decode will grow the message each time. svn path=/trunk/; revision=6656