1<testcase> 2<info> 3<keywords> 4FTP 5RETR 6-J 7</keywords> 8</info> 9 10# Server-side 11<reply> 12# file1360 contents... 13<data nocheck="yes"> 14HTTP/1.1 200 OK 15Date: Thu, 09 Nov 2010 14:49:00 GMT 16Server: test-server/fake 17Content-Length: 6 18Connection: close 19Content-Type: text/html 20Content-Disposition: filename=name1360; charset=funny; option=strange 21 22MOOOO 23</data> 24</reply> 25 26# Client-side 27<client> 28# this relies on the debug feature to allow us to set directory to store the 29# -O output in, using the CURL_TESTDIR variable 30<features> 31debug 32</features> 33<server> 34ftp 35</server> 36<name> 37FTP download, file with C-D inside, using -O -J -D stdout 38</name> 39<setenv> 40CURL_TESTDIR=%PWD/log 41</setenv> 42<command option="no-output,no-include"> 43ftp://%HOSTIP:%FTPPORT/path/file1360 -O -J -D - 44</command> 45<postcheck> 46perl %SRCDIR/libtest/notexists.pl log/name1360 47</postcheck> 48</client> 49 50# Verify data after the test has been "shot" 51<verify> 52<protocol> 53USER anonymous 54PASS ftp@example.com 55PWD 56CWD path 57EPSV 58TYPE I 59SIZE file1360 60RETR file1360 61QUIT 62</protocol> 63 64<file1 name="log/file1360"> 65HTTP/1.1 200 OK 66Date: Thu, 09 Nov 2010 14:49:00 GMT 67Server: test-server/fake 68Content-Length: 6 69Connection: close 70Content-Type: text/html 71Content-Disposition: filename=name1360; charset=funny; option=strange 72 73MOOOO 74</file1> 75 76<file2 name="log/stdout1360"> 77220- _ _ ____ _ 78220- ___| | | | _ \| | 79220- / __| | | | |_) | | 80220- | (__| |_| | _ {| |___ 81220 \___|\___/|_| \_\_____| 82331 We are happy you popped in! 83230 Welcome you silly person 84257 "/" is current directory 85250 CWD command successful. 86229 Entering Passive Mode (stripped) 87200 I modify TYPE as you wanted 88213 214 89150 Binary data connection for 1360 () (214 bytes). 90226 File transfer complete 91</file2> 92<stripfile2> 93s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/ 94</stripfile2> 95 96</verify> 97</testcase> 98