aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/rfc3501_imap4rev1_base.rs33
-rw-r--r--tests/rfc3691_imapext_unselect.rs28
-rw-r--r--tests/rfc6851_imapext_move.rs30
3 files changed, 0 insertions, 91 deletions
diff --git a/tests/rfc3501_imap4rev1_base.rs b/tests/rfc3501_imap4rev1_base.rs
deleted file mode 100644
index 690913a..0000000
--- a/tests/rfc3501_imap4rev1_base.rs
+++ /dev/null
@@ -1,33 +0,0 @@
-use anyhow::Context;
-
-mod common;
-use crate::common::fragments::*;
-
-fn main() {
- common::aerogramme_provider_daemon_dev(|imap_socket, lmtp_socket| {
- connect(imap_socket).context("server says hello")?;
- capability(imap_socket, Extension::None).context("check server capabilities")?;
- login(imap_socket, Account::Alice).context("login test")?;
- create_mailbox(imap_socket, Mailbox::Archive).context("created mailbox archive")?;
- // UNSUBSCRIBE IS NOT IMPLEMENTED YET
- //unsubscribe_mailbox(imap_socket).context("unsubscribe from archive")?;
- select(imap_socket, Mailbox::Inbox, None).context("select inbox")?;
- check(imap_socket).context("check must run")?;
- status_mailbox(imap_socket, Mailbox::Archive).context("status of archive from inbox")?;
- lmtp_handshake(lmtp_socket).context("handshake lmtp done")?;
- lmtp_deliver_email(lmtp_socket, Email::Multipart).context("mail delivered successfully")?;
- noop_exists(imap_socket).context("noop loop must detect a new email")?;
- fetch_rfc822(imap_socket, Selection::FirstId, Email::Multipart).context("fetch rfc822 message, should be our first message")?;
- copy(imap_socket, Selection::FirstId, Mailbox::Archive).context("copy message to the archive mailbox")?;
- append_email(imap_socket, Email::Basic).context("insert email in INBOX")?;
- // SEARCH IS NOT IMPLEMENTED YET
- //search(imap_socket).expect("search should return something");
- add_flags_email(imap_socket, Selection::FirstId, Flag::Deleted)
- .context("should add delete flag to the email")?;
- expunge(imap_socket).context("expunge emails")?;
- rename_mailbox(imap_socket, Mailbox::Archive, Mailbox::Drafts).context("Archive mailbox is renamed Drafts")?;
- delete_mailbox(imap_socket, Mailbox::Drafts).context("Drafts mailbox is deleted")?;
- Ok(())
- })
- .expect("test fully run");
-}
diff --git a/tests/rfc3691_imapext_unselect.rs b/tests/rfc3691_imapext_unselect.rs
deleted file mode 100644
index 4c5a45d..0000000
--- a/tests/rfc3691_imapext_unselect.rs
+++ /dev/null
@@ -1,28 +0,0 @@
-use anyhow::Context;
-
-mod common;
-use crate::common::fragments::*;
-
-fn main() {
- common::aerogramme_provider_daemon_dev(|imap_socket, lmtp_socket| {
- connect(imap_socket).context("server says hello")?;
-
- lmtp_handshake(lmtp_socket).context("handshake lmtp done")?;
- lmtp_deliver_email(lmtp_socket, Email::Basic).context("mail delivered successfully")?;
-
- capability(imap_socket, Extension::Unselect).context("check server capabilities")?;
- login(imap_socket, Account::Alice).context("login test")?;
- select(imap_socket, Mailbox::Inbox, None).context("select inbox")?;
- noop_exists(imap_socket).context("noop loop must detect a new email")?;
- add_flags_email(imap_socket, Selection::FirstId, Flag::Deleted).context("add delete flags to the email")?;
- unselect(imap_socket)
- .context("unselect inbox while preserving email with the \\Delete flag")?;
- select(imap_socket, Mailbox::Inbox, Some(1)).context("select inbox again")?;
- fetch_rfc822(imap_socket, Selection::FirstId, Email::Basic).context("message is still present")?;
- close(imap_socket).context("close inbox and expunge message")?;
- select(imap_socket, Mailbox::Inbox, Some(0)).context("select inbox again and check it's empty")?;
-
- Ok(())
- })
- .expect("test fully run");
-}
diff --git a/tests/rfc6851_imapext_move.rs b/tests/rfc6851_imapext_move.rs
deleted file mode 100644
index a535bce..0000000
--- a/tests/rfc6851_imapext_move.rs
+++ /dev/null
@@ -1,30 +0,0 @@
-use anyhow::Context;
-
-mod common;
-use common::fragments::*;
-
-fn main() {
- common::aerogramme_provider_daemon_dev(|imap_socket, lmtp_socket| {
- connect(imap_socket).context("server says hello")?;
-
- capability(imap_socket, Extension::Move).context("check server capabilities")?;
- login(imap_socket, Account::Alice).context("login test")?;
- create_mailbox(imap_socket, Mailbox::Archive).context("created mailbox archive")?;
- select(imap_socket, Mailbox::Inbox, None).context("select inbox")?;
-
- lmtp_handshake(lmtp_socket).context("handshake lmtp done")?;
- lmtp_deliver_email(lmtp_socket, Email::Basic).context("mail delivered successfully")?;
-
- noop_exists(imap_socket).context("noop loop must detect a new email")?;
- r#move(imap_socket, Selection::FirstId, Mailbox::Archive).context("message from inbox moved to archive")?;
-
- unselect(imap_socket)
- .context("unselect inbox while preserving email with the \\Delete flag")?;
- select(imap_socket, Mailbox::Archive, Some(1)).context("select archive")?;
- fetch_rfc822(imap_socket, Selection::FirstId, Email::Basic).context("check mail exists")?;
- logout(imap_socket).context("must quit")?;
-
- Ok(())
- })
- .expect("test fully run");
-}