aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtests/ftpserver.pl24
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/ftpserver.pl b/tests/ftpserver.pl
index 800aa979d..6f099b105 100755
--- a/tests/ftpserver.pl
+++ b/tests/ftpserver.pl
@@ -595,6 +595,7 @@ sub protocolsetup {
'LIST' => \&LIST_imap,
'LSUB' => \&LSUB_imap,
'LOGOUT' => \&LOGOUT_imap,
+ 'NOOP' => \&NOOP_imap,
'RENAME' => \&RENAME_imap,
'SEARCH' => \&SEARCH_imap,
'SELECT' => \&SELECT_imap,
@@ -1331,6 +1332,29 @@ sub UID_imap {
return 0;
}
+sub NOOP_imap {
+ my ($args) = @_;
+ my @data = (
+ "* 22 EXPUNGE\r\n",
+ "* 23 EXISTS\r\n",
+ "* 3 RECENT\r\n",
+ "* 14 FETCH (FLAGS (\\Seen \\Deleted))\r\n",
+ );
+
+ if ($args) {
+ sendcontrol "$cmdid BAD Command Argument\r\n";
+ }
+ else {
+ for my $d (@data) {
+ sendcontrol $d;
+ }
+
+ sendcontrol "$cmdid OK NOOP completed\r\n";
+ }
+
+ return 0;
+}
+
sub LOGOUT_imap {
sendcontrol "* BYE cURL IMAP server signing off\r\n";
sendcontrol "$cmdid OK LOGOUT completed\r\n";