From d27d55fe051d6f3bf5a5670f71ee2e0e9ee1c71e Mon Sep 17 00:00:00 2001 From: nobody Date: Wed, 15 May 2002 16:19:25 +0000 Subject: This commit was manufactured by cvs2svn to create tag 'guikachu-1_2_3'. svn path=/tags/guikachu-1_2_3/; revision=16902 --- camel/tests/folder/test9.c | 227 --------------------------------------------- 1 file changed, 227 deletions(-) delete mode 100644 camel/tests/folder/test9.c (limited to 'camel/tests/folder/test9.c') diff --git a/camel/tests/folder/test9.c b/camel/tests/folder/test9.c deleted file mode 100644 index 974c2c7793..0000000000 --- a/camel/tests/folder/test9.c +++ /dev/null @@ -1,227 +0,0 @@ -/* folder/index testing */ - -#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" -#include "camel/camel-filter-driver.h" -#include "camel/camel-stream-fs.h" - -#define ARRAY_LEN(x) (sizeof(x)/sizeof(x[0])) - -struct { - char *name; - CamelFolder *folder; -} mailboxes[] = { - { "INBOX", NULL }, - { "folder1", NULL }, - { "folder2", NULL }, - { "folder3", NULL }, - { "folder4", NULL }, -}; - -struct { - char *name, *match, *action; -} rules[] = { - { "empty1", "(match-all (header-contains \"Frobnitz\"))", "(copy-to \"folder1\")" }, - { "empty2", "(header-contains \"Frobnitz\")", "(copy-to \"folder2\")" }, - { "count11", "(and (header-contains \"subject\" \"Test1\") (header-contains \"subject\" \"subject\"))", "(move-to \"folder3\")" }, - { "empty3", "(and (header-contains \"subject\" \"Test1\") (header-contains \"subject\" \"subject\"))", "(move-to \"folder4\")" }, - { "count1", "(body-contains \"data50\")", "(copy-to \"folder1\")" }, - { "stop", "(body-contains \"data2\")", "(stop)" }, - { "notreached1", "(body-contains \"data2\")", "(move-to \"folder2\")" }, - { "count1", "(body-contains \"data3\")", "(move-to \"folder2\")" }, - { "ustrcasecmp", "(header-matches \"Subject\" \"Test0 message100 subject\")", "(copy-to \"folder2\")" }, -}; - -/* broken match rules */ -struct { - char *name, *match, *action; -} brokens[] = { - { "count1", "(body-contains data50)", "(copy-to \"folder1\")" }, /* non string argument */ - { "count1", "(body-contains-stuff \"data3\")", "(move-to-folder \"folder2\")" }, /* invalid function */ - { "count1", "(or (body-contains \"data3\") (foo))", "(move-to-folder \"folder2\")" }, /* invalid function */ - { "count1", "(or (body-contains \"data3\") (foo)", "(move-to-folder \"folder2\")" }, /* missing ) */ - { "count1", "(and body-contains \"data3\") (foo)", "(move-to-folder \"folder2\")" }, /* missing ( */ - { "count1", "body-contains \"data3\")", "(move-to-folder \"folder2\")" }, /* missing ( */ - { "count1", "body-contains \"data3\"", "(move-to-folder \"folder2\")" }, /* missing ( ) */ - { "count1", "(body-contains \"data3\" ())", "(move-to-folder \"folder2\")" }, /* extra () */ - { "count1", "()", "(move-to-folder \"folder2\")" }, /* invalid () */ - { "count1", "", "(move-to-folder \"folder2\")" }, /* empty */ -}; - -/* broken action rules */ -struct { - char *name, *match, *action; -} brokena[] = { - { "a", "(body-contains \"data2\")", "(body-contains \"help\")" }, /* rule in action */ - { "a", "(body-contains \"data2\")", "(move-to-folder-name \"folder2\")" }, /* unknown function */ - { "a", "(body-contains \"data2\")", "(or (move-to-folder \"folder2\")" }, /* missing ) */ - { "a", "(body-contains \"data2\")", "(or move-to-folder \"folder2\"))" }, /* missing ( */ - { "a", "(body-contains \"data2\")", "move-to-folder \"folder2\")" }, /* missing ( */ - { "a", "(body-contains \"data2\")", "(move-to-folder \"folder2\" ())" }, /* invalid () */ - { "a", "(body-contains \"data2\")", "()" }, /* invalid () */ - { "a", "(body-contains \"data2\")", "" }, /* empty */ -}; - -static CamelFolder *get_folder(CamelFilterDriver *d, const char *uri, void *data, CamelException *ex) -{ - int i; - - for (i=0;i