tests: provide FTP directory contents in the test file

Instead of providing a fixed single synthetic response in the test
server itself. To allow us to better use *different* directory listings
in different test cases. In this change, most listings remain the same
as before.

The wildcard match tests still use synthetic responses but we should fix
that as well.

Updated numerous test cases to use this.

Closes #14295
This commit is contained in:
Daniel Stenberg 2024-07-29 10:17:08 +02:00
parent ae0b08ae6e
commit 14f630ecf6
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2
42 changed files with 103 additions and 213 deletions

View File

@ -9,8 +9,6 @@ LIST
# #
# Server-side # Server-side
<reply> <reply>
# When doing LIST, we get the default list output hard-coded in the test
# FTP server
<data mode="text"> <data mode="text">
total 20 total 20
drwxr-xr-x 8 98 98 512 Oct 22 13:06 . drwxr-xr-x 8 98 98 512 Oct 22 13:06 .

View File

@ -8,9 +8,7 @@ LIST
</info> </info>
# Server-side # Server-side
<reply> <reply>
# When doing LIST, we get the default list output hard-coded in the test <data mode="text">
# FTP server
<datacheck mode="text">
total 20 total 20
drwxr-xr-x 8 98 98 512 Oct 22 13:06 . drwxr-xr-x 8 98 98 512 Oct 22 13:06 .
drwxr-xr-x 8 98 98 512 Oct 22 13:06 .. drwxr-xr-x 8 98 98 512 Oct 22 13:06 ..
@ -22,7 +20,7 @@ drwxrwxrwx 2 98 98 512 May 29 16:04 download.html
dr-xr-xr-x 2 0 1 512 Nov 30 1995 etc dr-xr-xr-x 2 0 1 512 Nov 30 1995 etc
drwxrwxrwx 2 98 1 512 Oct 30 14:33 pub drwxrwxrwx 2 98 1 512 Oct 30 14:33 pub
dr-xr-xr-x 5 0 1 512 Oct 1 1997 usr dr-xr-xr-x 5 0 1 512 Oct 1 1997 usr
</datacheck> </data>
</reply> </reply>
# Client-side # Client-side

View File

@ -9,9 +9,8 @@ LIST
# #
# Server-side # Server-side
<reply> <reply>
# When doing LIST, we get the default list output hard-coded in the test
# FTP server <data mode="text">
<datacheck mode="text">
total 20 total 20
drwxr-xr-x 8 98 98 512 Oct 22 13:06 . drwxr-xr-x 8 98 98 512 Oct 22 13:06 .
drwxr-xr-x 8 98 98 512 Oct 22 13:06 .. drwxr-xr-x 8 98 98 512 Oct 22 13:06 ..
@ -19,11 +18,11 @@ drwxr-xr-x 2 98 98 512 May 2 1996 .NeXT
-r--r--r-- 1 0 1 35 Jul 16 1996 README -r--r--r-- 1 0 1 35 Jul 16 1996 README
lrwxrwxrwx 1 0 1 7 Dec 9 1999 bin -> usr/bin lrwxrwxrwx 1 0 1 7 Dec 9 1999 bin -> usr/bin
dr-xr-xr-x 2 0 1 512 Oct 1 1997 dev dr-xr-xr-x 2 0 1 512 Oct 1 1997 dev
drwxrwxrwx 2 98 98 512 May 29 16:04 download.html drwxrwxrwx 2 98 98 512 May 29 16:04 downthis.html
dr-xr-xr-x 2 0 1 512 Nov 30 1995 etc dr-xr-xr-x 2 0 1 512 Nov 30 1995 etc
drwxrwxrwx 2 98 1 512 Oct 30 14:33 pub drwxrwxrwx 2 98 1 512 Oct 30 14:33 pub
dr-xr-xr-x 5 0 1 512 Oct 1 1997 usr dr-xr-xr-x 5 0 1 512 Oct 1 1997 usr
</datacheck> </data>
</reply> </reply>
# #

View File

@ -11,9 +11,7 @@ LIST
# #
# Server-side # Server-side
<reply> <reply>
# When doing LIST, we get the default list output hard-coded in the test <data mode="text">
# FTP server
<datacheck mode="text">
total 20 total 20
drwxr-xr-x 8 98 98 512 Oct 22 13:06 . drwxr-xr-x 8 98 98 512 Oct 22 13:06 .
drwxr-xr-x 8 98 98 512 Oct 22 13:06 .. drwxr-xr-x 8 98 98 512 Oct 22 13:06 ..
@ -25,7 +23,7 @@ drwxrwxrwx 2 98 98 512 May 29 16:04 download.html
dr-xr-xr-x 2 0 1 512 Nov 30 1995 etc dr-xr-xr-x 2 0 1 512 Nov 30 1995 etc
drwxrwxrwx 2 98 1 512 Oct 30 14:33 pub drwxrwxrwx 2 98 1 512 Oct 30 14:33 pub
dr-xr-xr-x 5 0 1 512 Oct 1 1997 usr dr-xr-xr-x 5 0 1 512 Oct 1 1997 usr
</datacheck> </data>
</reply> </reply>
# #

View File

@ -13,9 +13,7 @@ LIST
# #
# Server-side # Server-side
<reply> <reply>
# When doing LIST, we get the default list output hard-coded in the test <data mode="text">
# FTP server
<datacheck mode="text">
total 20 total 20
drwxr-xr-x 8 98 98 512 Oct 22 13:06 . drwxr-xr-x 8 98 98 512 Oct 22 13:06 .
drwxr-xr-x 8 98 98 512 Oct 22 13:06 .. drwxr-xr-x 8 98 98 512 Oct 22 13:06 ..
@ -27,7 +25,7 @@ drwxrwxrwx 2 98 98 512 May 29 16:04 download.html
dr-xr-xr-x 2 0 1 512 Nov 30 1995 etc dr-xr-xr-x 2 0 1 512 Nov 30 1995 etc
drwxrwxrwx 2 98 1 512 Oct 30 14:33 pub drwxrwxrwx 2 98 1 512 Oct 30 14:33 pub
dr-xr-xr-x 5 0 1 512 Oct 1 1997 usr dr-xr-xr-x 5 0 1 512 Oct 1 1997 usr
</datacheck> </data>
</reply> </reply>
# #

View File

@ -10,9 +10,7 @@ EPRT
# Server-side # Server-side
<reply> <reply>
# When doing LIST, we get the default list output hard-coded in the test <data mode="text">
# FTP server
<datacheck mode="text">
total 20 total 20
drwxr-xr-x 8 98 98 512 Oct 22 13:06 . drwxr-xr-x 8 98 98 512 Oct 22 13:06 .
drwxr-xr-x 8 98 98 512 Oct 22 13:06 .. drwxr-xr-x 8 98 98 512 Oct 22 13:06 ..
@ -24,7 +22,7 @@ drwxrwxrwx 2 98 98 512 May 29 16:04 download.html
dr-xr-xr-x 2 0 1 512 Nov 30 1995 etc dr-xr-xr-x 2 0 1 512 Nov 30 1995 etc
drwxrwxrwx 2 98 1 512 Oct 30 14:33 pub drwxrwxrwx 2 98 1 512 Oct 30 14:33 pub
dr-xr-xr-x 5 0 1 512 Oct 1 1997 usr dr-xr-xr-x 5 0 1 512 Oct 1 1997 usr
</datacheck> </data>
</reply> </reply>
# Client-side # Client-side

View File

@ -10,9 +10,7 @@ LIST
# #
# Server-side # Server-side
<reply> <reply>
# When doing LIST, we get the default list output hard-coded in the test <data mode="text">
# FTP server
<datacheck mode="text">
total 20 total 20
drwxr-xr-x 8 98 98 512 Oct 22 13:06 . drwxr-xr-x 8 98 98 512 Oct 22 13:06 .
drwxr-xr-x 8 98 98 512 Oct 22 13:06 .. drwxr-xr-x 8 98 98 512 Oct 22 13:06 ..
@ -24,7 +22,7 @@ drwxrwxrwx 2 98 98 512 May 29 16:04 download.html
dr-xr-xr-x 2 0 1 512 Nov 30 1995 etc dr-xr-xr-x 2 0 1 512 Nov 30 1995 etc
drwxrwxrwx 2 98 1 512 Oct 30 14:33 pub drwxrwxrwx 2 98 1 512 Oct 30 14:33 pub
dr-xr-xr-x 5 0 1 512 Oct 1 1997 usr dr-xr-xr-x 5 0 1 512 Oct 1 1997 usr
</datacheck> </data>
</reply> </reply>
# #

View File

@ -13,8 +13,6 @@ LIST
REPLY PWD 257 "just one REPLY PWD 257 "just one
</servercmd> </servercmd>
# When doing LIST, we get the default list output hard-coded in the test
# FTP server
<data mode="text"> <data mode="text">
total 20 total 20
drwxr-xr-x 8 98 98 512 Oct 22 13:06 . drwxr-xr-x 8 98 98 512 Oct 22 13:06 .

View File

@ -13,8 +13,6 @@ LIST
REPLY PWD 257 "/""hello""" REPLY PWD 257 "/""hello"""
</servercmd> </servercmd>
# When doing LIST, we get the default list output hard-coded in the test
# FTP server
<data mode="text"> <data mode="text">
total 20 total 20
drwxr-xr-x 8 98 98 512 Oct 22 13:06 . drwxr-xr-x 8 98 98 512 Oct 22 13:06 .

View File

@ -10,9 +10,8 @@ netrc
# #
# Server-side # Server-side
<reply> <reply>
# When doing LIST, we get the default list output hard-coded in the test
# FTP server <data mode="text">
<datacheck mode="text">
total 20 total 20
drwxr-xr-x 8 98 98 512 Oct 22 13:06 . drwxr-xr-x 8 98 98 512 Oct 22 13:06 .
drwxr-xr-x 8 98 98 512 Oct 22 13:06 .. drwxr-xr-x 8 98 98 512 Oct 22 13:06 ..
@ -24,7 +23,7 @@ drwxrwxrwx 2 98 98 512 May 29 16:04 download.html
dr-xr-xr-x 2 0 1 512 Nov 30 1995 etc dr-xr-xr-x 2 0 1 512 Nov 30 1995 etc
drwxrwxrwx 2 98 1 512 Oct 30 14:33 pub drwxrwxrwx 2 98 1 512 Oct 30 14:33 pub
dr-xr-xr-x 5 0 1 512 Oct 1 1997 usr dr-xr-xr-x 5 0 1 512 Oct 1 1997 usr
</datacheck> </data>
</reply> </reply>
# #

View File

@ -10,10 +10,7 @@ netrc
# #
# Server-side # Server-side
<reply> <reply>
# <data mode="text">
# When doing LIST, we get the default list output hard-coded in the test
# FTP server
<datacheck mode="text">
total 20 total 20
drwxr-xr-x 8 98 98 512 Oct 22 13:06 . drwxr-xr-x 8 98 98 512 Oct 22 13:06 .
drwxr-xr-x 8 98 98 512 Oct 22 13:06 .. drwxr-xr-x 8 98 98 512 Oct 22 13:06 ..
@ -25,7 +22,7 @@ drwxrwxrwx 2 98 98 512 May 29 16:04 download.html
dr-xr-xr-x 2 0 1 512 Nov 30 1995 etc dr-xr-xr-x 2 0 1 512 Nov 30 1995 etc
drwxrwxrwx 2 98 1 512 Oct 30 14:33 pub drwxrwxrwx 2 98 1 512 Oct 30 14:33 pub
dr-xr-xr-x 5 0 1 512 Oct 1 1997 usr dr-xr-xr-x 5 0 1 512 Oct 1 1997 usr
</datacheck> </data>
</reply> </reply>
# #

View File

@ -19,15 +19,7 @@ Magic: sure you can FTP me
</connect> </connect>
# When doing LIST, we get the default list output hard-coded in the test <data mode="text">
# FTP server
<datacheck mode="text">
HTTP/1.1 200 Mighty fine indeed
Magic: sure you can FTP me
HTTP/1.1 200 Mighty fine indeed
Magic: sure you can FTP me
total 20 total 20
drwxr-xr-x 8 98 98 512 Oct 22 13:06 . drwxr-xr-x 8 98 98 512 Oct 22 13:06 .
drwxr-xr-x 8 98 98 512 Oct 22 13:06 .. drwxr-xr-x 8 98 98 512 Oct 22 13:06 ..
@ -39,7 +31,7 @@ drwxrwxrwx 2 98 98 512 May 29 16:04 download.html
dr-xr-xr-x 2 0 1 512 Nov 30 1995 etc dr-xr-xr-x 2 0 1 512 Nov 30 1995 etc
drwxrwxrwx 2 98 1 512 Oct 30 14:33 pub drwxrwxrwx 2 98 1 512 Oct 30 14:33 pub
dr-xr-xr-x 5 0 1 512 Oct 1 1997 usr dr-xr-xr-x 5 0 1 512 Oct 1 1997 usr
</datacheck> </data>
</reply> </reply>
# #

View File

@ -10,9 +10,7 @@ netrc
# #
# Server-side # Server-side
<reply> <reply>
# When doing LIST, we get the default list output hard-coded in the test <data mode="text">
# FTP server
<datacheck mode="text">
total 20 total 20
drwxr-xr-x 8 98 98 512 Oct 22 13:06 . drwxr-xr-x 8 98 98 512 Oct 22 13:06 .
drwxr-xr-x 8 98 98 512 Oct 22 13:06 .. drwxr-xr-x 8 98 98 512 Oct 22 13:06 ..
@ -24,7 +22,7 @@ drwxrwxrwx 2 98 98 512 May 29 16:04 download.html
dr-xr-xr-x 2 0 1 512 Nov 30 1995 etc dr-xr-xr-x 2 0 1 512 Nov 30 1995 etc
drwxrwxrwx 2 98 1 512 Oct 30 14:33 pub drwxrwxrwx 2 98 1 512 Oct 30 14:33 pub
dr-xr-xr-x 5 0 1 512 Oct 1 1997 usr dr-xr-xr-x 5 0 1 512 Oct 1 1997 usr
</datacheck> </data>
</reply> </reply>
# #

View File

@ -10,9 +10,7 @@ netrc
# #
# Server-side # Server-side
<reply> <reply>
# When doing LIST, we get the default list output hard-coded in the test <data mode="text">
# FTP server
<datacheck mode="text">
total 20 total 20
drwxr-xr-x 8 98 98 512 Oct 22 13:06 . drwxr-xr-x 8 98 98 512 Oct 22 13:06 .
drwxr-xr-x 8 98 98 512 Oct 22 13:06 .. drwxr-xr-x 8 98 98 512 Oct 22 13:06 ..
@ -24,7 +22,7 @@ drwxrwxrwx 2 98 98 512 May 29 16:04 download.html
dr-xr-xr-x 2 0 1 512 Nov 30 1995 etc dr-xr-xr-x 2 0 1 512 Nov 30 1995 etc
drwxrwxrwx 2 98 1 512 Oct 30 14:33 pub drwxrwxrwx 2 98 1 512 Oct 30 14:33 pub
dr-xr-xr-x 5 0 1 512 Oct 1 1997 usr dr-xr-xr-x 5 0 1 512 Oct 1 1997 usr
</datacheck> </data>
</reply> </reply>
# #

View File

@ -10,9 +10,7 @@ netrc
# #
# Server-side # Server-side
<reply> <reply>
# When doing LIST, we get the default list output hard-coded in the test <data mode="text">
# FTP server
<datacheck mode="text">
total 20 total 20
drwxr-xr-x 8 98 98 512 Oct 22 13:06 . drwxr-xr-x 8 98 98 512 Oct 22 13:06 .
drwxr-xr-x 8 98 98 512 Oct 22 13:06 .. drwxr-xr-x 8 98 98 512 Oct 22 13:06 ..
@ -24,7 +22,7 @@ drwxrwxrwx 2 98 98 512 May 29 16:04 download.html
dr-xr-xr-x 2 0 1 512 Nov 30 1995 etc dr-xr-xr-x 2 0 1 512 Nov 30 1995 etc
drwxrwxrwx 2 98 1 512 Oct 30 14:33 pub drwxrwxrwx 2 98 1 512 Oct 30 14:33 pub
dr-xr-xr-x 5 0 1 512 Oct 1 1997 usr dr-xr-xr-x 5 0 1 512 Oct 1 1997 usr
</datacheck> </data>
</reply> </reply>
# #

View File

@ -10,9 +10,7 @@ netrc
# #
# Server-side # Server-side
<reply> <reply>
# When doing LIST, we get the default list output hard-coded in the test <data mode="text">
# FTP server
<datacheck mode="text">
total 20 total 20
drwxr-xr-x 8 98 98 512 Oct 22 13:06 . drwxr-xr-x 8 98 98 512 Oct 22 13:06 .
drwxr-xr-x 8 98 98 512 Oct 22 13:06 .. drwxr-xr-x 8 98 98 512 Oct 22 13:06 ..
@ -24,7 +22,7 @@ drwxrwxrwx 2 98 98 512 May 29 16:04 download.html
dr-xr-xr-x 2 0 1 512 Nov 30 1995 etc dr-xr-xr-x 2 0 1 512 Nov 30 1995 etc
drwxrwxrwx 2 98 1 512 Oct 30 14:33 pub drwxrwxrwx 2 98 1 512 Oct 30 14:33 pub
dr-xr-xr-x 5 0 1 512 Oct 1 1997 usr dr-xr-xr-x 5 0 1 512 Oct 1 1997 usr
</datacheck> </data>
</reply> </reply>
# #

View File

@ -7,9 +7,7 @@ FTP
# Server-side # Server-side
<reply> <reply>
# When doing LIST, we get the default list output hard-coded in the test <data mode="text">
# FTP server
<datacheck mode="text">
total 20 total 20
drwxr-xr-x 8 98 98 512 Oct 22 13:06 . drwxr-xr-x 8 98 98 512 Oct 22 13:06 .
drwxr-xr-x 8 98 98 512 Oct 22 13:06 .. drwxr-xr-x 8 98 98 512 Oct 22 13:06 ..
@ -21,7 +19,7 @@ drwxrwxrwx 2 98 98 512 May 29 16:04 download.html
dr-xr-xr-x 2 0 1 512 Nov 30 1995 etc dr-xr-xr-x 2 0 1 512 Nov 30 1995 etc
drwxrwxrwx 2 98 1 512 Oct 30 14:33 pub drwxrwxrwx 2 98 1 512 Oct 30 14:33 pub
dr-xr-xr-x 5 0 1 512 Oct 1 1997 usr dr-xr-xr-x 5 0 1 512 Oct 1 1997 usr
</datacheck> </data>
</reply> </reply>

View File

@ -11,7 +11,7 @@ SLOWDOWN
<reply> <reply>
# When doing LIST, we get the default list output hard-coded in the test # When doing LIST, we get the default list output hard-coded in the test
# FTP server # FTP server
<datacheck mode="text"> <data mode="text">
total 20 total 20
drwxr-xr-x 8 98 98 512 Oct 22 13:06 . drwxr-xr-x 8 98 98 512 Oct 22 13:06 .
drwxr-xr-x 8 98 98 512 Oct 22 13:06 .. drwxr-xr-x 8 98 98 512 Oct 22 13:06 ..
@ -23,7 +23,7 @@ drwxrwxrwx 2 98 98 512 May 29 16:04 download.html
dr-xr-xr-x 2 0 1 512 Nov 30 1995 etc dr-xr-xr-x 2 0 1 512 Nov 30 1995 etc
drwxrwxrwx 2 98 1 512 Oct 30 14:33 pub drwxrwxrwx 2 98 1 512 Oct 30 14:33 pub
dr-xr-xr-x 5 0 1 512 Oct 1 1997 usr dr-xr-xr-x 5 0 1 512 Oct 1 1997 usr
</datacheck> </data>
<servercmd> <servercmd>
SLOWDOWN SLOWDOWN
</servercmd> </servercmd>

View File

@ -8,9 +8,7 @@ SLOWDOWN
# Server-side # Server-side
<reply> <reply>
# When doing LIST, we get the default list output hard-coded in the test <data mode="text">
# FTP server
<datacheck mode="text">
total 20 total 20
drwxr-xr-x 8 98 98 512 Oct 22 13:06 . drwxr-xr-x 8 98 98 512 Oct 22 13:06 .
drwxr-xr-x 8 98 98 512 Oct 22 13:06 .. drwxr-xr-x 8 98 98 512 Oct 22 13:06 ..
@ -22,7 +20,7 @@ drwxrwxrwx 2 98 98 512 May 29 16:04 download.html
dr-xr-xr-x 2 0 1 512 Nov 30 1995 etc dr-xr-xr-x 2 0 1 512 Nov 30 1995 etc
drwxrwxrwx 2 98 1 512 Oct 30 14:33 pub drwxrwxrwx 2 98 1 512 Oct 30 14:33 pub
dr-xr-xr-x 5 0 1 512 Oct 1 1997 usr dr-xr-xr-x 5 0 1 512 Oct 1 1997 usr
</datacheck> </data>
<servercmd> <servercmd>
SLOWDOWN SLOWDOWN
</servercmd> </servercmd>

View File

@ -10,9 +10,7 @@ EPSV
# #
# Server-side # Server-side
<reply> <reply>
# When doing LIST, we get the default list output hard-coded in the test <data mode="text">
# FTP server
<datacheck mode="text">
total 20 total 20
drwxr-xr-x 8 98 98 512 Oct 22 13:06 . drwxr-xr-x 8 98 98 512 Oct 22 13:06 .
drwxr-xr-x 8 98 98 512 Oct 22 13:06 .. drwxr-xr-x 8 98 98 512 Oct 22 13:06 ..
@ -24,7 +22,7 @@ drwxrwxrwx 2 98 98 512 May 29 16:04 download.html
dr-xr-xr-x 2 0 1 512 Nov 30 1995 etc dr-xr-xr-x 2 0 1 512 Nov 30 1995 etc
drwxrwxrwx 2 98 1 512 Oct 30 14:33 pub drwxrwxrwx 2 98 1 512 Oct 30 14:33 pub
dr-xr-xr-x 5 0 1 512 Oct 1 1997 usr dr-xr-xr-x 5 0 1 512 Oct 1 1997 usr
</datacheck> </data>
</reply> </reply>
# #

View File

@ -10,9 +10,7 @@ EPRT
# #
# Server-side # Server-side
<reply> <reply>
# When doing LIST, we get the default list output hard-coded in the test <data mode="text">
# FTP server
<datacheck mode="text">
total 20 total 20
drwxr-xr-x 8 98 98 512 Oct 22 13:06 . drwxr-xr-x 8 98 98 512 Oct 22 13:06 .
drwxr-xr-x 8 98 98 512 Oct 22 13:06 .. drwxr-xr-x 8 98 98 512 Oct 22 13:06 ..
@ -21,10 +19,10 @@ drwxr-xr-x 2 98 98 512 May 2 1996 .NeXT
lrwxrwxrwx 1 0 1 7 Dec 9 1999 bin -> usr/bin lrwxrwxrwx 1 0 1 7 Dec 9 1999 bin -> usr/bin
dr-xr-xr-x 2 0 1 512 Oct 1 1997 dev dr-xr-xr-x 2 0 1 512 Oct 1 1997 dev
drwxrwxrwx 2 98 98 512 May 29 16:04 download.html drwxrwxrwx 2 98 98 512 May 29 16:04 download.html
dr-xr-xr-x 2 0 1 512 Nov 30 1995 etc dr-xr-xr-x 2 0 1 512 Nov 30 1995 moo
drwxrwxrwx 2 98 1 512 Oct 30 14:33 pub drwxrwxrwx 2 98 1 512 Oct 30 14:33 pub
dr-xr-xr-x 5 0 1 512 Oct 1 1997 usr dr-xr-xr-x 5 0 1 512 Oct 1 1997 usr
</datacheck> </data>
</reply> </reply>
# #

View File

@ -11,9 +11,7 @@ EPSV
# #
# Server-side # Server-side
<reply> <reply>
# When doing LIST, we get the default list output hard-coded in the test <data mode="text">
# FTP server
<datacheck mode="text">
total 20 total 20
drwxr-xr-x 8 98 98 512 Oct 22 13:06 . drwxr-xr-x 8 98 98 512 Oct 22 13:06 .
drwxr-xr-x 8 98 98 512 Oct 22 13:06 .. drwxr-xr-x 8 98 98 512 Oct 22 13:06 ..
@ -25,7 +23,7 @@ drwxrwxrwx 2 98 98 512 May 29 16:04 download.html
dr-xr-xr-x 2 0 1 512 Nov 30 1995 etc dr-xr-xr-x 2 0 1 512 Nov 30 1995 etc
drwxrwxrwx 2 98 1 512 Oct 30 14:33 pub drwxrwxrwx 2 98 1 512 Oct 30 14:33 pub
dr-xr-xr-x 5 0 1 512 Oct 1 1997 usr dr-xr-xr-x 5 0 1 512 Oct 1 1997 usr
</datacheck> </data>
</reply> </reply>
# #

View File

@ -11,9 +11,7 @@ EPRT
# #
# Server-side # Server-side
<reply> <reply>
# When doing LIST, we get the default list output hard-coded in the test <data mode="text">
# FTP server
<datacheck mode="text">
total 20 total 20
drwxr-xr-x 8 98 98 512 Oct 22 13:06 . drwxr-xr-x 8 98 98 512 Oct 22 13:06 .
drwxr-xr-x 8 98 98 512 Oct 22 13:06 .. drwxr-xr-x 8 98 98 512 Oct 22 13:06 ..
@ -25,7 +23,7 @@ drwxrwxrwx 2 98 98 512 May 29 16:04 download.html
dr-xr-xr-x 2 0 1 512 Nov 30 1995 etc dr-xr-xr-x 2 0 1 512 Nov 30 1995 etc
drwxrwxrwx 2 98 1 512 Oct 30 14:33 pub drwxrwxrwx 2 98 1 512 Oct 30 14:33 pub
dr-xr-xr-x 5 0 1 512 Oct 1 1997 usr dr-xr-xr-x 5 0 1 512 Oct 1 1997 usr
</datacheck> </data>
</reply> </reply>
# #

View File

@ -10,9 +10,7 @@ LIST
# #
# Server-side # Server-side
<reply> <reply>
# When doing LIST, we get the default list output hard-coded in the test <data mode="text">
# FTP server
<datacheck mode="text">
total 20 total 20
drwxr-xr-x 8 98 98 512 Oct 22 13:06 . drwxr-xr-x 8 98 98 512 Oct 22 13:06 .
drwxr-xr-x 8 98 98 512 Oct 22 13:06 .. drwxr-xr-x 8 98 98 512 Oct 22 13:06 ..
@ -23,8 +21,8 @@ dr-xr-xr-x 2 0 1 512 Oct 1 1997 dev
drwxrwxrwx 2 98 98 512 May 29 16:04 download.html drwxrwxrwx 2 98 98 512 May 29 16:04 download.html
dr-xr-xr-x 2 0 1 512 Nov 30 1995 etc dr-xr-xr-x 2 0 1 512 Nov 30 1995 etc
drwxrwxrwx 2 98 1 512 Oct 30 14:33 pub drwxrwxrwx 2 98 1 512 Oct 30 14:33 pub
dr-xr-xr-x 5 0 1 512 Oct 1 1997 usr dr-xr-xr-x 5 0 1 512 Oct 1 1997 fine
</datacheck> </data>
<servercmd> <servercmd>
REPLY USER 530 We don't like USER commands REPLY USER 530 We don't like USER commands
COUNT USER 1 COUNT USER 1

View File

@ -11,9 +11,7 @@ ACCT
# #
# Server-side # Server-side
<reply> <reply>
# When doing LIST, we get the default list output hard-coded in the test <data mode="text">
# FTP server
<datacheck mode="text">
total 20 total 20
drwxr-xr-x 8 98 98 512 Oct 22 13:06 . drwxr-xr-x 8 98 98 512 Oct 22 13:06 .
drwxr-xr-x 8 98 98 512 Oct 22 13:06 .. drwxr-xr-x 8 98 98 512 Oct 22 13:06 ..
@ -25,7 +23,7 @@ drwxrwxrwx 2 98 98 512 May 29 16:04 download.html
dr-xr-xr-x 2 0 1 512 Nov 30 1995 etc dr-xr-xr-x 2 0 1 512 Nov 30 1995 etc
drwxrwxrwx 2 98 1 512 Oct 30 14:33 pub drwxrwxrwx 2 98 1 512 Oct 30 14:33 pub
dr-xr-xr-x 5 0 1 512 Oct 1 1997 usr dr-xr-xr-x 5 0 1 512 Oct 1 1997 usr
</datacheck> </data>
<servercmd> <servercmd>
REPLY PASS 332 Give me an ACCT now REPLY PASS 332 Give me an ACCT now
REPLY ACCT 230 Thank-you for the ACCT REPLY ACCT 230 Thank-you for the ACCT

View File

@ -9,9 +9,7 @@ LIST
# #
# Server-side # Server-side
<reply> <reply>
# When doing LIST, we get the default list output hard-coded in the test <data mode="text">
# FTP server
<datacheck mode="text">
total 20 total 20
drwxr-xr-x 8 98 98 512 Oct 22 13:06 . drwxr-xr-x 8 98 98 512 Oct 22 13:06 .
drwxr-xr-x 8 98 98 512 Oct 22 13:06 .. drwxr-xr-x 8 98 98 512 Oct 22 13:06 ..
@ -23,7 +21,7 @@ drwxrwxrwx 2 98 98 512 May 29 16:04 download.html
dr-xr-xr-x 2 0 1 512 Nov 30 1995 etc dr-xr-xr-x 2 0 1 512 Nov 30 1995 etc
drwxrwxrwx 2 98 1 512 Oct 30 14:33 pub drwxrwxrwx 2 98 1 512 Oct 30 14:33 pub
dr-xr-xr-x 5 0 1 512 Oct 1 1997 usr dr-xr-xr-x 5 0 1 512 Oct 1 1997 usr
</datacheck> </data>
</reply> </reply>
# #

View File

@ -9,9 +9,7 @@ LIST
# #
# Server-side # Server-side
<reply> <reply>
# When doing LIST, we get the default list output hard-coded in the test <data mode="text">
# FTP server
<datacheck mode="text">
total 20 total 20
drwxr-xr-x 8 98 98 512 Oct 22 13:06 . drwxr-xr-x 8 98 98 512 Oct 22 13:06 .
drwxr-xr-x 8 98 98 512 Oct 22 13:06 .. drwxr-xr-x 8 98 98 512 Oct 22 13:06 ..
@ -23,7 +21,7 @@ drwxrwxrwx 2 98 98 512 May 29 16:04 download.html
dr-xr-xr-x 2 0 1 512 Nov 30 1995 etc dr-xr-xr-x 2 0 1 512 Nov 30 1995 etc
drwxrwxrwx 2 98 1 512 Oct 30 14:33 pub drwxrwxrwx 2 98 1 512 Oct 30 14:33 pub
dr-xr-xr-x 5 0 1 512 Oct 1 1997 usr dr-xr-xr-x 5 0 1 512 Oct 1 1997 usr
</datacheck> </data>
</reply> </reply>
# #

View File

@ -9,9 +9,7 @@ LIST
# #
# Server-side # Server-side
<reply> <reply>
# When doing LIST, we get the default list output hard-coded in the test <data mode="text">
# FTP server
<datacheck mode="text">
total 20 total 20
drwxr-xr-x 8 98 98 512 Oct 22 13:06 . drwxr-xr-x 8 98 98 512 Oct 22 13:06 .
drwxr-xr-x 8 98 98 512 Oct 22 13:06 .. drwxr-xr-x 8 98 98 512 Oct 22 13:06 ..
@ -23,7 +21,7 @@ drwxrwxrwx 2 98 98 512 May 29 16:04 download.html
dr-xr-xr-x 2 0 1 512 Nov 30 1995 etc dr-xr-xr-x 2 0 1 512 Nov 30 1995 etc
drwxrwxrwx 2 98 1 512 Oct 30 14:33 pub drwxrwxrwx 2 98 1 512 Oct 30 14:33 pub
dr-xr-xr-x 5 0 1 512 Oct 1 1997 usr dr-xr-xr-x 5 0 1 512 Oct 1 1997 usr
</datacheck> </data>
</reply> </reply>
# #

View File

@ -9,9 +9,7 @@ LIST
# #
# Server-side # Server-side
<reply> <reply>
# When doing LIST, we get the default list output hard-coded in the test <data mode="text">
# FTP server
<datacheck mode="text">
total 20 total 20
drwxr-xr-x 8 98 98 512 Oct 22 13:06 . drwxr-xr-x 8 98 98 512 Oct 22 13:06 .
drwxr-xr-x 8 98 98 512 Oct 22 13:06 .. drwxr-xr-x 8 98 98 512 Oct 22 13:06 ..
@ -23,7 +21,7 @@ drwxrwxrwx 2 98 98 512 May 29 16:04 download.html
dr-xr-xr-x 2 0 1 512 Nov 30 1995 etc dr-xr-xr-x 2 0 1 512 Nov 30 1995 etc
drwxrwxrwx 2 98 1 512 Oct 30 14:33 pub drwxrwxrwx 2 98 1 512 Oct 30 14:33 pub
dr-xr-xr-x 5 0 1 512 Oct 1 1997 usr dr-xr-xr-x 5 0 1 512 Oct 1 1997 usr
</datacheck> </data>
</reply> </reply>
# #

View File

@ -10,9 +10,7 @@ netrc
# #
# Server-side # Server-side
<reply> <reply>
# When doing LIST, we get the default list output hard-coded in the test <data mode="text">
# FTP server
<datacheck mode="text">
total 20 total 20
drwxr-xr-x 8 98 98 512 Oct 22 13:06 . drwxr-xr-x 8 98 98 512 Oct 22 13:06 .
drwxr-xr-x 8 98 98 512 Oct 22 13:06 .. drwxr-xr-x 8 98 98 512 Oct 22 13:06 ..
@ -24,7 +22,7 @@ drwxrwxrwx 2 98 98 512 May 29 16:04 download.html
dr-xr-xr-x 2 0 1 512 Nov 30 1995 etc dr-xr-xr-x 2 0 1 512 Nov 30 1995 etc
drwxrwxrwx 2 98 1 512 Oct 30 14:33 pub drwxrwxrwx 2 98 1 512 Oct 30 14:33 pub
dr-xr-xr-x 5 0 1 512 Oct 1 1997 usr dr-xr-xr-x 5 0 1 512 Oct 1 1997 usr
</datacheck> </data>
</reply> </reply>
# #

View File

@ -10,9 +10,7 @@ netrc
# #
# Server-side # Server-side
<reply> <reply>
# When doing LIST, we get the default list output hard-coded in the test <data mode="text">
# FTP server
<datacheck mode="text">
total 20 total 20
drwxr-xr-x 8 98 98 512 Oct 22 13:06 . drwxr-xr-x 8 98 98 512 Oct 22 13:06 .
drwxr-xr-x 8 98 98 512 Oct 22 13:06 .. drwxr-xr-x 8 98 98 512 Oct 22 13:06 ..
@ -24,7 +22,7 @@ drwxrwxrwx 2 98 98 512 May 29 16:04 download.html
dr-xr-xr-x 2 0 1 512 Nov 30 1995 etc dr-xr-xr-x 2 0 1 512 Nov 30 1995 etc
drwxrwxrwx 2 98 1 512 Oct 30 14:33 pub drwxrwxrwx 2 98 1 512 Oct 30 14:33 pub
dr-xr-xr-x 5 0 1 512 Oct 1 1997 usr dr-xr-xr-x 5 0 1 512 Oct 1 1997 usr
</datacheck> </data>
</reply> </reply>
# #

View File

@ -10,9 +10,7 @@ LIST
# #
# Server-side # Server-side
<reply> <reply>
# When doing LIST, we get the default list output hard-coded in the test <data mode="text">
# FTPS server
<datacheck mode="text">
total 20 total 20
drwxr-xr-x 8 98 98 512 Oct 22 13:06 . drwxr-xr-x 8 98 98 512 Oct 22 13:06 .
drwxr-xr-x 8 98 98 512 Oct 22 13:06 .. drwxr-xr-x 8 98 98 512 Oct 22 13:06 ..
@ -24,7 +22,7 @@ drwxrwxrwx 2 98 98 512 May 29 16:04 download.html
dr-xr-xr-x 2 0 1 512 Nov 30 1995 etc dr-xr-xr-x 2 0 1 512 Nov 30 1995 etc
drwxrwxrwx 2 98 1 512 Oct 30 14:33 pub drwxrwxrwx 2 98 1 512 Oct 30 14:33 pub
dr-xr-xr-x 5 0 1 512 Oct 1 1997 usr dr-xr-xr-x 5 0 1 512 Oct 1 1997 usr
</datacheck> </data>
</reply> </reply>
# #

View File

@ -12,9 +12,7 @@ FAILURE
# #
# Server-side # Server-side
<reply> <reply>
# When doing LIST, we get the default list output hard-coded in the test <data mode="text">
# FTPS server
<datacheck mode="text">
total 20 total 20
drwxr-xr-x 8 98 98 512 Oct 22 13:06 . drwxr-xr-x 8 98 98 512 Oct 22 13:06 .
drwxr-xr-x 8 98 98 512 Oct 22 13:06 .. drwxr-xr-x 8 98 98 512 Oct 22 13:06 ..
@ -26,7 +24,7 @@ drwxrwxrwx 2 98 98 512 May 29 16:04 download.html
dr-xr-xr-x 2 0 1 512 Nov 30 1995 etc dr-xr-xr-x 2 0 1 512 Nov 30 1995 etc
drwxrwxrwx 2 98 1 512 Oct 30 14:33 pub drwxrwxrwx 2 98 1 512 Oct 30 14:33 pub
dr-xr-xr-x 5 0 1 512 Oct 1 1997 usr dr-xr-xr-x 5 0 1 512 Oct 1 1997 usr
</datacheck> </data>
</reply> </reply>
# #

View File

@ -10,9 +10,7 @@ LIST
# #
# Server-side # Server-side
<reply> <reply>
# When doing LIST, we get the default list output hard-coded in the test <data mode="text">
# FTPS server
<datacheck mode="text">
total 20 total 20
drwxr-xr-x 8 98 98 512 Oct 22 13:06 . drwxr-xr-x 8 98 98 512 Oct 22 13:06 .
drwxr-xr-x 8 98 98 512 Oct 22 13:06 .. drwxr-xr-x 8 98 98 512 Oct 22 13:06 ..
@ -24,7 +22,7 @@ drwxrwxrwx 2 98 98 512 May 29 16:04 download.html
dr-xr-xr-x 2 0 1 512 Nov 30 1995 etc dr-xr-xr-x 2 0 1 512 Nov 30 1995 etc
drwxrwxrwx 2 98 1 512 Oct 30 14:33 pub drwxrwxrwx 2 98 1 512 Oct 30 14:33 pub
dr-xr-xr-x 5 0 1 512 Oct 1 1997 usr dr-xr-xr-x 5 0 1 512 Oct 1 1997 usr
</datacheck> </data>
</reply> </reply>
# #

View File

@ -9,9 +9,7 @@ CURLOPT_PORT
# #
# Server-side # Server-side
<reply> <reply>
# When doing LIST, we get the default list output hard-coded in the test <data mode="text">
# FTP server
<datacheck mode="text">
total 20 total 20
drwxr-xr-x 8 98 98 512 Oct 22 13:06 . drwxr-xr-x 8 98 98 512 Oct 22 13:06 .
drwxr-xr-x 8 98 98 512 Oct 22 13:06 .. drwxr-xr-x 8 98 98 512 Oct 22 13:06 ..
@ -23,7 +21,7 @@ drwxrwxrwx 2 98 98 512 May 29 16:04 download.html
dr-xr-xr-x 2 0 1 512 Nov 30 1995 etc dr-xr-xr-x 2 0 1 512 Nov 30 1995 etc
drwxrwxrwx 2 98 1 512 Oct 30 14:33 pub drwxrwxrwx 2 98 1 512 Oct 30 14:33 pub
dr-xr-xr-x 5 0 1 512 Oct 1 1997 usr dr-xr-xr-x 5 0 1 512 Oct 1 1997 usr
</datacheck> </data>
</reply> </reply>
# #

View File

@ -12,22 +12,14 @@ FTP
file contents file contents
</data> </data>
<data1>
contents for file number two
</data1>
<datacheck> <datacheck>
file contents file contents
contents for file number two
</datacheck> </datacheck>
<datacheck1 mode="text">
total 20
drwxr-xr-x 8 98 98 512 Oct 22 13:06 .
drwxr-xr-x 8 98 98 512 Oct 22 13:06 ..
drwxr-xr-x 2 98 98 512 May 2 1996 .NeXT
-r--r--r-- 1 0 1 35 Jul 16 1996 README
lrwxrwxrwx 1 0 1 7 Dec 9 1999 bin -> usr/bin
dr-xr-xr-x 2 0 1 512 Oct 1 1997 dev
drwxrwxrwx 2 98 98 512 May 29 16:04 download.html
dr-xr-xr-x 2 0 1 512 Nov 30 1995 etc
drwxrwxrwx 2 98 1 512 Oct 30 14:33 pub
dr-xr-xr-x 5 0 1 512 Oct 1 1997 usr
</datacheck1>
</reply> </reply>
# Client-side # Client-side
@ -44,7 +36,7 @@ lib%TESTNUMBER
Two FTP fetches using different CURLOPT_FTP_FILEMETHOD Two FTP fetches using different CURLOPT_FTP_FILEMETHOD
</name> </name>
<command> <command>
ftp://%HOSTIP:%FTPPORT/path/to/the/file/%TESTNUMBER ftp://%HOSTIP:%FTPPORT/path/to/the/file/%TESTNUMBER ftp://%HOSTIP:%FTPPORT/path/to/the/file/%TESTNUMBER0001
</command> </command>
</client> </client>
@ -63,8 +55,8 @@ RETR %TESTNUMBER
SYST SYST
CWD / CWD /
EPSV EPSV
TYPE A SIZE path/to/the/file/%TESTNUMBER0001
LIST path/to/the/file/%TESTNUMBER. RETR path/to/the/file/%TESTNUMBER0001
QUIT QUIT
</protocol> </protocol>
</verify> </verify>

View File

@ -11,10 +11,8 @@ ftplistparser
# #
# Server-side # Server-side
<reply> #
<data mode="text"> # Data is generated by the ftp server itself
</data>
</reply>
# Client-side # Client-side
<client> <client>

View File

@ -11,9 +11,7 @@ SOCKS4
# #
# Server-side # Server-side
<reply> <reply>
# When doing LIST, we get the default list output hard-coded in the test <data mode="text">
# FTP server
<datacheck mode="text">
total 20 total 20
drwxr-xr-x 8 98 98 512 Oct 22 13:06 . drwxr-xr-x 8 98 98 512 Oct 22 13:06 .
drwxr-xr-x 8 98 98 512 Oct 22 13:06 .. drwxr-xr-x 8 98 98 512 Oct 22 13:06 ..
@ -25,7 +23,7 @@ drwxrwxrwx 2 98 98 512 May 29 16:04 download.html
dr-xr-xr-x 2 0 1 512 Nov 30 1995 etc dr-xr-xr-x 2 0 1 512 Nov 30 1995 etc
drwxrwxrwx 2 98 1 512 Oct 30 14:33 pub drwxrwxrwx 2 98 1 512 Oct 30 14:33 pub
dr-xr-xr-x 5 0 1 512 Oct 1 1997 usr dr-xr-xr-x 5 0 1 512 Oct 1 1997 usr
</datacheck> </data>
</reply> </reply>
# #

View File

@ -11,9 +11,7 @@ SOCKS5
# #
# Server-side # Server-side
<reply> <reply>
# When doing LIST, we get the default list output hard-coded in the test <data mode="text">
# FTP server
<datacheck mode="text">
total 20 total 20
drwxr-xr-x 8 98 98 512 Oct 22 13:06 . drwxr-xr-x 8 98 98 512 Oct 22 13:06 .
drwxr-xr-x 8 98 98 512 Oct 22 13:06 .. drwxr-xr-x 8 98 98 512 Oct 22 13:06 ..
@ -25,7 +23,7 @@ drwxrwxrwx 2 98 98 512 May 29 16:04 download.html
dr-xr-xr-x 2 0 1 512 Nov 30 1995 etc dr-xr-xr-x 2 0 1 512 Nov 30 1995 etc
drwxrwxrwx 2 98 1 512 Oct 30 14:33 pub drwxrwxrwx 2 98 1 512 Oct 30 14:33 pub
dr-xr-xr-x 5 0 1 512 Oct 1 1997 usr dr-xr-xr-x 5 0 1 512 Oct 1 1997 usr
</datacheck> </data>
</reply> </reply>
# #

View File

@ -2071,7 +2071,8 @@ sub CWD_ftp {
my ($folder, $fullcommand) = $_[0]; my ($folder, $fullcommand) = $_[0];
switch_directory($folder); switch_directory($folder);
if($ftptargetdir =~ /^\/fully_simulated/) { if($ftptargetdir =~ /^\/fully_simulated/) {
$ftplistparserstate = "enabled"; $ftplistparserstate = "enabled";
logmsg "enabled FTP list parser mode\n";
} }
else { else {
undef $ftplistparserstate; undef $ftplistparserstate;
@ -2091,19 +2092,6 @@ sub PWD_ftp {
sub LIST_ftp { sub LIST_ftp {
# print "150 ASCII data connection for /bin/ls (193.15.23.1,59196) (0 bytes)\r\n"; # print "150 ASCII data connection for /bin/ls (193.15.23.1,59196) (0 bytes)\r\n";
# this is a built-in fake-dir ;-)
my @ftpdir=("total 20\r\n",
"drwxr-xr-x 8 98 98 512 Oct 22 13:06 .\r\n",
"drwxr-xr-x 8 98 98 512 Oct 22 13:06 ..\r\n",
"drwxr-xr-x 2 98 98 512 May 2 1996 .NeXT\r\n",
"-r--r--r-- 1 0 1 35 Jul 16 1996 README\r\n",
"lrwxrwxrwx 1 0 1 7 Dec 9 1999 bin -> usr/bin\r\n",
"dr-xr-xr-x 2 0 1 512 Oct 1 1997 dev\r\n",
"drwxrwxrwx 2 98 98 512 May 29 16:04 download.html\r\n",
"dr-xr-xr-x 2 0 1 512 Nov 30 1995 etc\r\n",
"drwxrwxrwx 2 98 1 512 Oct 30 14:33 pub\r\n",
"dr-xr-xr-x 5 0 1 512 Oct 1 1997 usr\r\n");
if($datasockf_conn eq 'no') { if($datasockf_conn eq 'no') {
if($nodataconn425) { if($nodataconn425) {
sendcontrol "150 Opening data connection\r\n"; sendcontrol "150 Opening data connection\r\n";
@ -2123,15 +2111,17 @@ my @ftpdir=("total 20\r\n",
return 0; return 0;
} }
if($ftplistparserstate) {
@ftpdir = ftp_contentlist($ftptargetdir);
}
logmsg "pass LIST data on data connection\n"; logmsg "pass LIST data on data connection\n";
if($cwd_testno) { if($ftplistparserstate) {
loadtest("$logdir/test$cwd_testno"); # provide a synthetic response
my @ftpdir = ftp_contentlist($ftptargetdir);
# old hard-coded style
for(@ftpdir) {
senddata $_;
}
}
else {
my @data = getpart("reply", "data"); my @data = getpart("reply", "data");
for(@data) { for(@data) {
my $send = $_; my $send = $_;
@ -2141,13 +2131,6 @@ my @ftpdir=("total 20\r\n",
logmsg "send $send as data\n"; logmsg "send $send as data\n";
senddata $send; senddata $send;
} }
$cwd_testno = 0; # forget it again
}
else {
# old hard-coded style
for(@ftpdir) {
senddata $_;
}
} }
close_dataconn(0); close_dataconn(0);
sendcontrol "226 ASCII transfer complete\r\n"; sendcontrol "226 ASCII transfer complete\r\n";
@ -2214,6 +2197,7 @@ sub MDTM_ftp {
sub SIZE_ftp { sub SIZE_ftp {
my $testno = $_[0]; my $testno = $_[0];
if($ftplistparserstate) { if($ftplistparserstate) {
my $size = wildcard_filesize($ftptargetdir, $testno); my $size = wildcard_filesize($ftptargetdir, $testno);
if($size == -1) { if($size == -1) {
@ -2374,7 +2358,7 @@ sub RETR_ftp {
$sz = "($retrsize bytes)"; $sz = "($retrsize bytes)";
} }
sendcontrol "150 Binary data connection for $testno () $sz.\r\n"; sendcontrol "150 Binary data connection for $testno ($testpart) $sz.\r\n";
for(@data) { for(@data) {
my $send = $_; my $send = $_;

View File

@ -55,18 +55,11 @@ CURLcode test(char *URL)
/* /*
* Change the FTP_FILEMETHOD option to use full paths rather than a CWD * Change the FTP_FILEMETHOD option to use full paths rather than a CWD
* command. Alter the URL's path a bit, appending a "./". Use an innocuous * command. Use an innocuous QUOTE command, after which curl will CWD to
* QUOTE command, after which curl will CWD to ftp_conn->entrypath and then * ftp_conn->entrypath and then (on the next call to ftp_statemach_act)
* (on the next call to ftp_statemach_act) find a non-zero ftpconn->dirdepth * find a non-zero ftpconn->dirdepth even though no directories are stored
* even though no directories are stored in the ftpconn->dirs array (after a * in the ftpconn->dirs array (after a call to freedirs).
* call to freedirs).
*/ */
newURL = aprintf("%s./", URL);
if(!newURL) {
curl_easy_cleanup(curl);
curl_global_cleanup();
return TEST_ERR_MAJOR_BAD;
}
slist = curl_slist_append(NULL, "SYST"); slist = curl_slist_append(NULL, "SYST");
if(!slist) { if(!slist) {
@ -76,7 +69,7 @@ CURLcode test(char *URL)
return TEST_ERR_MAJOR_BAD; return TEST_ERR_MAJOR_BAD;
} }
test_setopt(curl, CURLOPT_URL, newURL); test_setopt(curl, CURLOPT_URL, libtest_arg2);
test_setopt(curl, CURLOPT_FTP_FILEMETHOD, (long) CURLFTPMETHOD_NOCWD); test_setopt(curl, CURLOPT_FTP_FILEMETHOD, (long) CURLFTPMETHOD_NOCWD);
test_setopt(curl, CURLOPT_QUOTE, slist); test_setopt(curl, CURLOPT_QUOTE, slist);

View File

@ -31,8 +31,8 @@ static int new_fnmatch(void *ptr,
const char *pattern, const char *string) const char *pattern, const char *string)
{ {
(void)ptr; (void)ptr;
(void)pattern; fprintf(stderr, "lib574: match string '%s' against pattern '%s'\n",
(void)string; string, pattern);
return CURL_FNMATCHFUNC_MATCH; return CURL_FNMATCHFUNC_MATCH;
} }