Multiple bugfixes found while running imap-test.
This commit is contained in:
@@ -49,7 +49,7 @@ pub async fn test(imap: &mut ImapConnection, _imap_check: &mut ImapConnection) {
|
||||
.assert_contains("EMAILID (")
|
||||
.assert_contains("but then I thought, why not do both?")
|
||||
.assert_contains(concat!(
|
||||
"ENVELOPE (\"Sat, 20 Nov 2021 22:22:01 +0000\" ",
|
||||
"ENVELOPE (\"Sat, 20 Nov 2021 14:22:01 -0800\" ",
|
||||
"\"Why not both importing AND exporting? ☺\" ",
|
||||
"((\"Art Vandelay (Vandelay Industries)\" NIL \"art\" \"vandelay.com\")) ",
|
||||
"((\"Art Vandelay (Vandelay Industries)\" NIL \"art\" \"vandelay.com\")) ",
|
||||
|
||||
@@ -26,6 +26,13 @@ use imap_proto::ResponseType;
|
||||
use super::{AssertResult, ImapConnection, Type};
|
||||
|
||||
pub async fn test(mut imap: &mut ImapConnection, mut imap_check: &mut ImapConnection) {
|
||||
// Create third connection for testing
|
||||
let mut other_conn = ImapConnection::connect(b"_z ").await;
|
||||
other_conn
|
||||
.send("AUTHENTICATE PLAIN {32+}\r\nAGpkb2VAZXhhbXBsZS5jb20Ac2VjcmV0")
|
||||
.await;
|
||||
other_conn.assert_read(Type::Tagged, ResponseType::Ok).await;
|
||||
|
||||
// List folders
|
||||
imap.send("LIST \"\" \"*\"").await;
|
||||
imap.assert_read(Type::Tagged, ResponseType::Ok)
|
||||
@@ -48,6 +55,12 @@ pub async fn test(mut imap: &mut ImapConnection, mut imap_check: &mut ImapConnec
|
||||
imap.assert_read(Type::Tagged, ResponseType::Ok).await;
|
||||
imap.send("CREATE \"Fruit/Apple/Green\"").await;
|
||||
imap.assert_read(Type::Tagged, ResponseType::Ok).await;
|
||||
|
||||
// Select folder from another connection
|
||||
other_conn.send("SELECT \"Tofu\"").await;
|
||||
other_conn.assert_read(Type::Tagged, ResponseType::Ok).await;
|
||||
|
||||
// Make sure folders are visible
|
||||
for imap in [&mut imap, &mut imap_check] {
|
||||
imap.send("LIST \"\" \"*\"").await;
|
||||
imap.assert_read(Type::Tagged, ResponseType::Ok)
|
||||
|
||||
Reference in New Issue
Block a user