aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Fandrich <dan@coneharvesters.com>2007-10-24 19:39:29 +0000
committerDan Fandrich <dan@coneharvesters.com>2007-10-24 19:39:29 +0000
commit4f00a02ba3f5717b824ccf57c30b75e9ce01a438 (patch)
tree1237f6aa2f2fb12c888376b8516d81aaca063c2e
parentedef367e9c66ff75d5bb6ccc655c4ba91f25d9cd (diff)
Fixed the test FTP server to support the >10000 test number notation
-rw-r--r--tests/ftpserver.pl21
1 files changed, 18 insertions, 3 deletions
diff --git a/tests/ftpserver.pl b/tests/ftpserver.pl
index c98b752ae..05d5ca68f 100644
--- a/tests/ftpserver.pl
+++ b/tests/ftpserver.pl
@@ -337,6 +337,11 @@ sub NLST_command {
sub MDTM_command {
my $testno = $_[0];
+ my $testpart = "";
+ if ($testno > 10000) {
+ $testpart = $testno % 10000;
+ $testno = $testno / 10000;
+ }
loadtest("$srcdir/data/test$testno");
@@ -359,6 +364,11 @@ sub MDTM_command {
sub SIZE_command {
my $testno = $_[0];
+ my $testpart = "";
+ if ($testno > 10000) {
+ $testpart = $testno % 10000;
+ $testno = $testno / 10000;
+ }
loadtest("$srcdir/data/test$testno");
@@ -383,7 +393,7 @@ sub SIZE_command {
}
else {
$size=0;
- @data = getpart("reply", "data");
+ @data = getpart("reply", "data" . $testpart);
for(@data) {
$size += length($_);
}
@@ -416,17 +426,22 @@ sub RETR_command {
}
$testno =~ s/^([^0-9]*)//;
+ my $testpart = "";
+ if ($testno > 10000) {
+ $testpart = $testno % 10000;
+ $testno = $testno / 10000;
+ }
loadtest("$srcdir/data/test$testno");
- my @data = getpart("reply", "data");
+ my @data = getpart("reply", "data" . $testpart);
my $size=0;
for(@data) {
$size += length($_);
}
- my %hash = getpartattr("reply", "data");
+ my %hash = getpartattr("reply", "data" . $testpart);
if($size || $hash{'sendzero'}) {