aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2005-01-20 22:47:31 +0000
committerDaniel Stenberg <daniel@haxx.se>2005-01-20 22:47:31 +0000
commitb264a03f891551c442eaff048f6e81ae74d450c1 (patch)
tree50f7bd68b3e6b0d72d8839767b50e5e09f8ce47f /tests
parent7472ede32ae5a1c80928e03ef8fd836630eb6ac8 (diff)
Support file names passed to RETR that don't start with a number. In that
case, all non-numeric prefixing letters are cut off to figure out the test number.
Diffstat (limited to 'tests')
-rw-r--r--tests/ftpserver.pl5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/ftpserver.pl b/tests/ftpserver.pl
index bffa30a4d..866090888 100644
--- a/tests/ftpserver.pl
+++ b/tests/ftpserver.pl
@@ -55,7 +55,6 @@ sub ftpmsg {
open(INPUT, ">>log/server$ftpdnum.input") ||
logmsg "failed to open log/server$ftpdnum.input\n";
- INPUT->autoflush(1);
print INPUT @_;
close(INPUT);
@@ -297,7 +296,7 @@ sub SIZE_command {
}
sub RETR_command {
- my $testno = $_[0];
+ my ($testno) = @_;
logmsg "RETR file \"$testno\"\n";
@@ -318,6 +317,8 @@ sub RETR_command {
return 0;
}
+ $testno =~ s/^([^0-9]*)//;
+
loadtest("$srcdir/data/test$testno");
my @data = getpart("reply", "data");