1<testcase>
2<info>
3<keywords>
4FTP
5RETR
6-J
7</keywords>
8</info>
9
10# Server-side
11<reply>
12# file1389 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=name1389; charset=funny; option=strange
21
22MOOOO
23</data>
24</reply>
25
26# Client-side
27<client>
28<server>
29ftp
30</server>
31<name>
32FTP DL, file with C-D inside, using -o fname -J -D file
33</name>
34<command option="no-output,no-include">
35ftp://%HOSTIP:%FTPPORT/path/file1389 -o log/download1389 -J -D log/heads1389
36</command>
37<postcheck>
38perl %SRCDIR/libtest/notexists.pl log/file1389 log/name1389
39</postcheck>
40</client>
41
42# Verify data after the test has been "shot"
43<verify>
44<protocol>
45USER anonymous
46PASS ftp@example.com
47PWD
48CWD path
49EPSV
50TYPE I
51SIZE file1389
52RETR file1389
53QUIT
54</protocol>
55
56<file1 name="log/download1389">
57HTTP/1.1 200 OK
58Date: Thu, 09 Nov 2010 14:49:00 GMT
59Server: test-server/fake
60Content-Length: 6
61Connection: close
62Content-Type: text/html
63Content-Disposition: filename=name1389; charset=funny; option=strange
64
65MOOOO
66</file1>
67
68<file2 name="log/heads1389">
69220-        _   _ ____  _
70220-    ___| | | |  _ \| |
71220-   / __| | | | |_) | |
72220-  | (__| |_| |  _ {| |___
73220    \___|\___/|_| \_\_____|
74331 We are happy you popped in!
75230 Welcome you silly person
76257 "/" is current directory
77250 CWD command successful.
78229 Entering Passive Mode (stripped)
79200 I modify TYPE as you wanted
80213 222
81150 Binary data connection for 1389 () (222 bytes).
82226 File transfer complete
83</file2>
84<stripfile2>
85s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/
86</stripfile2>
87
88<file3 name="log/stdout1389">
89</file3>
90
91</verify>
92</testcase>
93