aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorGravatar Hoà V. DINH <dinh.viet.hoa@gmail.com>2016-02-06 20:12:32 -0800
committerGravatar Hoà V. DINH <dinh.viet.hoa@gmail.com>2016-02-06 20:12:32 -0800
commit73510821024cc8e79b22238609810e6a72d320f3 (patch)
tree1a31eb4db04f425559398e83723e471490f38f22 /tests
parentdefd490256295574ad7ff18a7774847aea3dcee3 (diff)
parenta122289d871ea92e8e19bb9d53e0d8f89b8cf5e6 (diff)
Merge pull request #1351 from kolyuchiy/imap-move
Imap move
Diffstat (limited to 'tests')
-rw-r--r--tests/test-all.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/test-all.cpp b/tests/test-all.cpp
index 9b506792..1858bef1 100644
--- a/tests/test-all.cpp
+++ b/tests/test-all.cpp
@@ -141,6 +141,28 @@ static void testIMAP()
session->release();
}
+static void testIMAPMove()
+{
+ mailcore::IMAPSession * session;
+ mailcore::HashMap *uidMapping;
+ mailcore::ErrorCode error;
+
+ session = new mailcore::IMAPSession();
+ session->setHostname(MCSTR("imap.mail.ru"));
+ session->setPort(993);
+ session->setUsername(email);
+ session->setPassword(password);
+ session->setConnectionType(mailcore::ConnectionTypeTLS);
+
+ session->moveMessages(MCSTR("INBOX"),
+ mailcore::IndexSet::indexSetWithIndex(14990),
+ MCSTR("Personal"), &uidMapping, &error);
+
+ MCLog("mapping: %s, error: %i", MCUTF8DESC(uidMapping), error);
+
+ session->release();
+}
+
static void testSMTP(mailcore::Data * data)
{
mailcore::SMTPSession * smtp;
@@ -371,6 +393,7 @@ void testAll()
//testMessageParser(data);
//testSMTP(data);
//testIMAP();
+ //testIMAPMove();
//testPOP();
//testNNTP();
//testAsyncSMTP(data);