From 5c0eae136b2c01a38c14a6148989b88ab8ab068f Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sat, 4 Jan 2014 23:39:30 +0100 Subject: 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 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. --- tests/data/test100 | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'tests/data/test100') 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 # When doing LIST, we get the default list output hard-coded in the test # FTP server - + 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 - + # @@ -36,7 +36,7 @@ ftp FTP dir list PASV -ftp://%HOSTIP:%FTPPORT/ +ftp://%HOSTIP:%FTPPORT/test-100/ @@ -47,6 +47,7 @@ ftp://%HOSTIP:%FTPPORT/ USER anonymous PASS ftp@example.com PWD +CWD test-100 EPSV TYPE A LIST -- cgit v1.2.3