Files
evolution/camel/tests/folder/test2.c
Not Zed e905364bee Only create a missing uid if we have indexing turned on.
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
2001-06-18 14:36:44 +00:00

59 lines
1.3 KiB
C

/* folder testing */
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include "camel-test.h"
#include "messages.h"
#include "folders.h"
#include "session.h"
#include <camel/camel-exception.h>
#include <camel/camel-service.h>
#include <camel/camel-store.h>
#include <camel/camel-folder.h>
#include <camel/camel-folder-summary.h>
#include <camel/camel-mime-message.h>
#define ARRAY_LEN(x) (sizeof(x)/sizeof(x[0]))
static char *stores[] = {
"mbox:///tmp/camel-test/mbox",
"mh:///tmp/camel-test/mh",
"maildir:///tmp/camel-test/maildir"
};
int main(int argc, char **argv)
{
CamelSession *session;
CamelException *ex;
int i;
camel_test_init(argc, argv);
/* clear out any camel-test data */
system("/bin/rm -rf /tmp/camel-test");
ex = camel_exception_new();
session = camel_test_session_new ("/tmp/camel-test");
/* we iterate over all stores we want to test, with indexing or indexing turned on or off */
for (i=0;i<ARRAY_LEN(stores);i++) {
char *name = stores[i];
test_folder_message_ops(session, name, TRUE, FALSE);
}
/* create a pseudo-spool file, and check that */
creat("/tmp/camel-test/testbox", 0600);
test_folder_message_ops(session, "spool:///tmp/camel-test/testbox", FALSE, TRUE);
check_unref(session, 1);
camel_exception_free(ex);
return 0;
}