Commit Graph

9 Commits

Author SHA1 Message Date
6b132fe48a Change the case sensitive search of subject to expect case insensitive
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
2002-08-29 12:04:34 +00:00
5fb3a28aba Updated to pass the needed arguments to camel_init() and to init gthreads
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
2002-08-19 20:14:15 +00:00
5a223c85b9 Updated to match the current API.
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
2001-06-27 22:21:05 +00:00
618ce2988e Fix an fd leak
* 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
2001-05-27 19:52:07 +00:00
d538a34c4b Subclass CamelSession since we can no longer specify the passwd callback
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
2001-05-14 20:08:25 +00:00
5870f8ab9b Added more test rules.
svn path=/trunk/; revision=8102
2001-02-08 03:53:15 +00:00
1a403012d4 Changed the subject search to handle case sensitive when it is mixed case.
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
2001-01-25 02:04:28 +00:00
d38a417de3 Add a missed unref.
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
2000-11-29 10:49:05 +00:00
3998a03ae9 Set the info size's properly, oops!
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
2000-11-28 13:13:23 +00:00