diff options
author | Steve Holme <steve_holme@hotmail.com> | 2013-08-30 22:11:17 +0100 |
---|---|---|
committer | Steve Holme <steve_holme@hotmail.com> | 2013-08-30 22:11:17 +0100 |
commit | 64c89090718499bd499522c1668c6e0ef00567f9 (patch) | |
tree | 281d932b5c85f261ecb02af74766a2f5e13045b9 | |
parent | e848942505fc8648e54f706451aac8b2bfe444fb (diff) |
ftpserver.pl: Small correction tidy up
Corrected some IMAP variable names and whitespace issues.
-rwxr-xr-x | tests/ftpserver.pl | 35 |
1 files changed, 18 insertions, 17 deletions
diff --git a/tests/ftpserver.pl b/tests/ftpserver.pl index 2fd714ea8..a5740842c 100755 --- a/tests/ftpserver.pl +++ b/tests/ftpserver.pl @@ -576,22 +576,22 @@ sub protocolsetup { } elsif($proto eq 'imap') { %commandfunc = ( - 'APPEND' => \&APPEND_imap, + 'APPEND' => \&APPEND_imap, 'CAPABILITY' => \&CAPABILITY_imap, - 'CREATE' => \&CREATE_imap, - 'DELETE' => \&DELETE_imap, - 'EXAMINE' => \&EXAMINE_imap, - 'FETCH' => \&FETCH_imap, - 'LIST' => \&LIST_imap, - 'LOGOUT' => \&LOGOUT_imap, - 'RENAME' => \&RENAME_imap, - 'SEARCH' => \&SEARCH_imap, - 'SELECT' => \&SELECT_imap, - 'STATUS' => \&STATUS_imap, - 'STORE' => \&STORE_imap + 'CREATE' => \&CREATE_imap, + 'DELETE' => \&DELETE_imap, + 'EXAMINE' => \&EXAMINE_imap, + 'FETCH' => \&FETCH_imap, + 'LIST' => \&LIST_imap, + 'LOGOUT' => \&LOGOUT_imap, + 'RENAME' => \&RENAME_imap, + 'SEARCH' => \&SEARCH_imap, + 'SELECT' => \&SELECT_imap, + 'STATUS' => \&STATUS_imap, + 'STORE' => \&STORE_imap ); %displaytext = ( - 'LOGIN' => ' OK LOGIN completed', + 'LOGIN' => ' OK LOGIN completed', 'welcome' => join("", ' _ _ ____ _ '."\r\n", ' ___| | | | _ \| | '."\r\n", @@ -874,12 +874,12 @@ sub APPEND_imap { logmsg "APPEND_imap got $args\r\n"; $args =~ /^([^ ]+) [^{]*\{(\d+)\}$/; - my ($folder, $size) = ($1, $2); - fix_imap_params($folder); + my ($mailbox, $size) = ($1, $2); + fix_imap_params($mailbox); sendcontrol "+ Ready for literal data\r\n"; - my $testno = $folder; + my $testno = $mailbox; my $filename = "log/upload.$testno"; logmsg "Store test number $testno in $filename\n"; @@ -977,13 +977,14 @@ sub LIST_imap { } else { my $testno = $reference; + $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"); |