diff options
author | Steve Holme <steve_holme@hotmail.com> | 2013-04-29 12:43:18 +0100 |
---|---|---|
committer | Steve Holme <steve_holme@hotmail.com> | 2013-04-29 12:53:09 +0100 |
commit | b56e3d43e5de43121779dfbbe0f7d1a19bef8c7b (patch) | |
tree | c14f8702dd8e6cf26b4d932bedb957d81c33d2b6 /tests/ftpserver.pl | |
parent | f317ffb7bbd18428ab3275ac47bf82f146f6c066 (diff) |
tests: Added imap STATUS command test
Diffstat (limited to 'tests/ftpserver.pl')
-rwxr-xr-x | tests/ftpserver.pl | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/ftpserver.pl b/tests/ftpserver.pl index 4c0144ff9..1163dcb74 100755 --- a/tests/ftpserver.pl +++ b/tests/ftpserver.pl @@ -583,6 +583,7 @@ sub protocolsetup { 'LIST' => \&LIST_imap, 'LOGOUT' => \&LOGOUT_imap, 'SELECT' => \&SELECT_imap, + 'STATUS' => \&STATUS_imap, 'STORE' => \&STORE_imap ); %displaytext = ( @@ -1004,6 +1005,32 @@ sub EXAMINE_imap { return 0; } +sub STATUS_imap { + my ($testno) = @_; + fix_imap_params($testno); + + logmsg "STATUS_imap got test $testno\n"; + + $testno =~ s/^([^0-9]*)//; + my $testpart = ""; + if ($testno > 10000) { + $testpart = $testno % 10000; + $testno = int($testno / 10000); + } + + loadtest("$srcdir/data/test$testno"); + + @data = getpart("reply", "data$testpart"); + + for my $d (@data) { + sendcontrol $d; + } + + sendcontrol "$cmdid OK STATUS completed\r\n"; + + return 0; +} + sub LOGOUT_imap { sendcontrol "* BYE cURL IMAP server signing off\r\n"; sendcontrol "$cmdid OK LOGOUT completed\r\n"; |