aboutsummaryrefslogtreecommitdiff
path: root/tests/data/test100
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2014-01-04 23:39:30 +0100
committerDaniel Stenberg <daniel@haxx.se>2014-01-04 23:39:30 +0100
commit5c0eae136b2c01a38c14a6148989b88ab8ab068f (patch)
treed40a87aa7f556f37fe85d10b67ca725fa20a957e /tests/data/test100
parent5220c1d69240dfab2087990d24229f81db9b4b33 (diff)
ftp tests: provide LIST responses in the test file itself
Previously LIST always returned a fixed hardcoded list that the ftp server code knew about, mostly since the server didn't get any test case number in the LIST scenario. Starting now, doing a CWD to a directory named test-[number] will make the test server remember that number and consider it a test case so that a subsequent LIST command will send the <data> section of that test case back. It allows LIST tests to be made more similar to how all other tests work. Test 100 was updated to provide its own directory listing.
Diffstat (limited to 'tests/data/test100')
-rw-r--r--tests/data/test1009
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/data/test100 b/tests/data/test100
index 6127163b2..6e0f734ac 100644
--- a/tests/data/test100
+++ b/tests/data/test100
@@ -11,11 +11,11 @@ LIST
<reply>
# When doing LIST, we get the default list output hard-coded in the test
# FTP server
-<datacheck>
+<data>
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
+drwxr-xr-x 2 98 98 512 May 2 1996 curl-releases
-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
@@ -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
drwxrwxrwx 2 98 1 512 Oct 30 14:33 pub
dr-xr-xr-x 5 0 1 512 Oct 1 1997 usr
-</datacheck>
+</data>
</reply>
#
@@ -36,7 +36,7 @@ ftp
FTP dir list PASV
</name>
<command>
-ftp://%HOSTIP:%FTPPORT/
+ftp://%HOSTIP:%FTPPORT/test-100/
</command>
</client>
@@ -47,6 +47,7 @@ ftp://%HOSTIP:%FTPPORT/
USER anonymous
PASS ftp@example.com
PWD
+CWD test-100
EPSV
TYPE A
LIST