aboutsummaryrefslogtreecommitdiffstats
path: root/camel/tests/folder/test2.c
diff options
context:
space:
mode:
Diffstat (limited to 'camel/tests/folder/test2.c')
-rw-r--r--camel/tests/folder/test2.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/camel/tests/folder/test2.c b/camel/tests/folder/test2.c
index c7a1af2c33..06053f76c0 100644
--- a/camel/tests/folder/test2.c
+++ b/camel/tests/folder/test2.c
@@ -43,10 +43,13 @@ int main(int argc, char **argv)
GPtrArray *uids;
const CamelMessageInfo *info;
- ex = camel_exception_new();
-
camel_test_init(argc, argv);
+ /* clear out any camel-test data */
+ system("/bin/rm -rf /tmp/camel-test");
+
+ ex = camel_exception_new();
+
session = camel_session_new("/tmp/camel-test", auth_callback, NULL, NULL);
/* todo: cross-check everything with folder_info checks as well */
@@ -221,7 +224,7 @@ int main(int argc, char **argv)
camel_folder_free_uids(folder, uids);
pull();
- camel_object_unref((CamelObject *)folder);
+ check_unref(folder, 1);
pull(); /* re-opening folder */
push("deleting test folder, with no messages in it");
@@ -229,12 +232,12 @@ int main(int argc, char **argv)
check_msg(!camel_exception_is_set(ex), "%s", camel_exception_get_description(ex));
pull();
- camel_object_unref((CamelObject *)store);
+ check_unref(store, 1);
camel_test_end();
}
}
- camel_object_unref((CamelObject *)session);
+ check_unref(session, 1);
camel_exception_free(ex);
return 0;