diff --git a/tests/data/test677 b/tests/data/test677
index 15526a67e..e3d9041fd 100644
--- a/tests/data/test677
+++ b/tests/data/test677
@@ -37,8 +37,7 @@ imap://%HOSTIP:%IMAPPORT/677
 <verify>
 <protocol>
 A001 CAPABILITY
-A1 IDLE
-A002 LOGOUT
+A1 IDLE
 </protocol>
 </verify>
 </testcase>
diff --git a/tests/libtest/lib677.c b/tests/libtest/lib677.c
index 74675c882..316ddc988 100644
--- a/tests/libtest/lib677.c
+++ b/tests/libtest/lib677.c
@@ -25,7 +25,7 @@
 #include "warnless.h"
 #include "memdebug.h"
 
-static const char cmd[] = "A1 IDLE\n";
+static const char cmd[] = "A1 IDLE\r\n";
 static char buf[1024];
 
 int test(char *URL)

