xref: /curl/tests/data/test1360 (revision 39697dea)
1<testcase>
2<info>
3<keywords>
4FTP
5RETR
6-J
7</keywords>
8</info>
9
10# Server-side
11<reply>
12# file%TESTNUMBER contents...
13<data nocheck="yes">
14HTTP/1.1 200 OK
15Date: Tue, 09 Nov 2010 14:49:00 GMT
16Server: test-server/fake
17Content-Length: 6
18Connection: close
19Content-Type: text/html
20Content-Disposition: filename=name%TESTNUMBER; charset=funny; option=strange
21
22MOOOO
23</data>
24</reply>
25
26# Client-side
27<client>
28<server>
29ftp
30</server>
31<name>
32FTP download, file with C-D inside, using -O -J -D stdout
33</name>
34<command option="no-output,no-include">
35ftp://%HOSTIP:%FTPPORT/path/file%TESTNUMBER -O -J -D - --output-dir %LOGDIR
36</command>
37</client>
38
39# Verify data after the test has been "shot"
40<verify>
41<strip>
42QUIT
43</strip>
44<protocol>
45USER anonymous
46PASS ftp@example.com
47PWD
48CWD path
49EPSV
50TYPE I
51SIZE file%TESTNUMBER
52RETR file%TESTNUMBER
53QUIT
54</protocol>
55
56<file1 name="%LOGDIR/file%TESTNUMBER">
57HTTP/1.1 200 OK
58Date: Tue, 09 Nov 2010 14:49:00 GMT
59Server: test-server/fake
60Content-Length: 6
61Connection: close
62Content-Type: text/html
63Content-Disposition: filename=name%TESTNUMBER; charset=funny; option=strange
64
65MOOOO
66</file1>
67
68<file2 name="%LOGDIR/stdout%TESTNUMBER">
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 214
81150 Binary data connection for %TESTNUMBER () (214 bytes).
82226 File transfer complete
83</file2>
84<stripfile2>
85s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/
86</stripfile2>
87
88<notexists>
89%LOGDIR/name%TESTNUMBER
90</notexists>
91</verify>
92</testcase>
93