1 <testcase> 2 <info> 3 <keywords> 4 FTP 5 RETR 6 -J 7 </keywords> 8 </info> 9 10 # Server-side 11 <reply> 12 # file1390 contents... 13 <data nocheck="yes"> 14 HTTP/1.1 200 OK 15 Date: Thu, 09 Nov 2010 14:49:00 GMT 16 Server: test-server/fake 17 Content-Length: 6 18 Connection: close 19 Content-Type: text/html 20 Content-Disposition: filename=name1390; charset=funny; option=strange 21 22 MOOOO 23 </data> 24 </reply> 25 26 # Client-side 27 <client> 28 <server> 29 ftp 30 </server> 31 <name> 32 FTP DL, file with C-D inside, using -o fname -J -D stdout 33 </name> 34 <command option="no-output,no-include"> 35 ftp://%HOSTIP:%FTPPORT/path/file1390 -o log/download1390 -J -D - 36 </command> 37 <postcheck> 38 perl %SRCDIR/libtest/notexists.pl log/file1390 log/name1390 39 </postcheck> 40 </client> 41 42 # Verify data after the test has been "shot" 43 <verify> 44 <protocol> 45 USER anonymous 46 PASS ftp (a] example.com 47 PWD 48 CWD path 49 EPSV 50 TYPE I 51 SIZE file1390 52 RETR file1390 53 QUIT 54 </protocol> 55 56 <file1 name="log/download1390"> 57 HTTP/1.1 200 OK 58 Date: Thu, 09 Nov 2010 14:49:00 GMT 59 Server: test-server/fake 60 Content-Length: 6 61 Connection: close 62 Content-Type: text/html 63 Content-Disposition: filename=name1390; charset=funny; option=strange 64 65 MOOOO 66 </file1> 67 68 <file2 name="log/stdout1390"> 69 220- _ _ ____ _ 70 220- ___| | | | _ \| | 71 220- / __| | | | |_) | | 72 220- | (__| |_| | _ {| |___ 73 220 \___|\___/|_| \_\_____| 74 331 We are happy you popped in! 75 230 Welcome you silly person 76 257 "/" is current directory 77 250 CWD command successful. 78 229 Entering Passive Mode (stripped) 79 200 I modify TYPE as you wanted 80 213 222 81 150 Binary data connection for 1390 () (222 bytes). 82 226 File transfer complete 83 </file2> 84 <stripfile2> 85 s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/ 86 </stripfile2> 87 88 </verify> 89 </testcase> 90