• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<testcase>
2<info>
3<keywords>
4FTP
5RETR
6-J
7</keywords>
8</info>
9
10# Server-side
11<reply>
12<data nocheck="yes">
13fooo
14mooo
15</data>
16</reply>
17
18# Client-side
19<client>
20# this relies on the debug feature to allow us to set directory to store the
21# -O output in, using the CURL_TESTDIR variable
22<features>
23debug
24</features>
25<server>
26ftp
27</server>
28<name>
29FTP download, file without C-D inside, using -O -J -D stdout
30</name>
31<setenv>
32CURL_TESTDIR=%PWD/log
33</setenv>
34<command option="no-output,no-include">
35ftp://%HOSTIP:%FTPPORT/path/file1352 -O -J -D -
36</command>
37</client>
38
39# Verify data after the test has been "shot"
40<verify>
41<protocol>
42USER anonymous
43PASS ftp@example.com
44PWD
45CWD path
46EPSV
47TYPE I
48SIZE file1352
49RETR file1352
50QUIT
51</protocol>
52
53<file1 name="log/file1352">
54fooo
55mooo
56</file1>
57
58# The final "221 bye bye baby" response to QUIT will not be recorded
59# since that is not considered part of this particular transfer!
60<file2 name="log/stdout1352">
61220-        _   _ ____  _
62220-    ___| | | |  _ \| |
63220-   / __| | | | |_) | |
64220-  | (__| |_| |  _ {| |___
65220    \___|\___/|_| \_\_____|
66331 We are happy you popped in!
67230 Welcome you silly person
68257 "/" is current directory
69250 CWD command successful.
70229 Entering Passive Mode (stripped)
71200 I modify TYPE as you wanted
72213 10
73150 Binary data connection for 1352 () (10 bytes).
74226 File transfer complete
75</file2>
76<stripfile2>
77s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/
78</stripfile2>
79
80</verify>
81</testcase>
82