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
45 lines
1.8 KiB
Plaintext
45 lines
1.8 KiB
Plaintext
|
|
This directory is to contain regression tests that should be run
|
|
before committing anything to camel.
|
|
|
|
In each subdirectory of tests there is a README containing a
|
|
one-line description of each test file. This README must be kept
|
|
uptodate.
|
|
|
|
To write a new test: copy an existing one and replace the contents.
|
|
|
|
See camel-test.h for a number of functions and macros which setup and
|
|
define the test environmet, and help provide meaningful messages when
|
|
something actually fails.
|
|
|
|
All tests have the following options:
|
|
-v[vvvv]
|
|
verbose. more v's more verbose. 2 v's will give you
|
|
a simple test backtrace of any partially failed tests.
|
|
No v's give you a simple backtrace of any failed tests.
|
|
-q
|
|
quiet. Dont print anything, unless there is a SEGV.
|
|
|
|
See the other files in lib/* for utility functions that help to
|
|
write the tests (object comparison, creation, etc functions).
|
|
|
|
Tests may fail and be non-fatal. In this case, you will see "Partial
|
|
success" on the result of each test line. To get more information
|
|
about the test, run the test manually with a -v command line argument.
|
|
The more v's you have the more detail you get (upto about -vvvvv),
|
|
generally use -vv to find out which parts of a partially successful
|
|
test failed, and where.
|
|
|
|
Note that if writing tests, non-fatal tests (bracketed by a
|
|
camel_test_nonfatal() and camel_test_fatal() pair) should only be
|
|
defined where: 1. The test in question should ideally pass, and 2. The
|
|
code has known limitations currently that stop it passing, but
|
|
otherwise works for nominal input.
|
|
|
|
To debug tests, set a breakpoint on camel_test_fail, which will be
|
|
called for any failure, even a non-fatal one. Or set it to
|
|
camel_test_break, which will only be called for fatal errors which are
|
|
to print to the screen.
|
|
|
|
Michael <notzed@helixcode.com>
|