| 1 |
<testcase> |
| 2 |
<info> |
| 3 |
<keywords> |
| 4 |
FTP |
| 5 |
RETR |
| 6 |
-J |
| 7 |
</keywords> |
| 8 |
</info> |
| 9 |
|
| 10 |
# Server-side |
| 11 |
<reply> |
| 12 |
<data nocheck="yes"> |
| 13 |
fooo |
| 14 |
mooo |
| 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> |
| 23 |
debug |
| 24 |
</features> |
| 25 |
<server> |
| 26 |
ftp |
| 27 |
</server> |
| 28 |
<name> |
| 29 |
FTP download, file without C-D inside, using -O -J -D stdout |
| 30 |
</name> |
| 31 |
<setenv> |
| 32 |
CURL_TESTDIR=%PWD/log |
| 33 |
</setenv> |
| 34 |
<command option="no-output,no-include"> |
| 35 |
ftp://%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> |
| 42 |
USER anonymous |
| 43 |
PASS [email protected] |
| 44 |
PWD |
| 45 |
CWD path |
| 46 |
EPSV |
| 47 |
TYPE I |
| 48 |
SIZE file1352 |
| 49 |
RETR file1352 |
| 50 |
QUIT |
| 51 |
</protocol> |
| 52 |
|
| 53 |
<file1 name="log/file1352"> |
| 54 |
fooo |
| 55 |
mooo |
| 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"> |
| 61 |
220- _ _ ____ _ |
| 62 |
220- ___| | | | _ \| | |
| 63 |
220- / __| | | | |_) | | |
| 64 |
220- | (__| |_| | _ {| |___ |
| 65 |
220 \___|\___/|_| \_\_____| |
| 66 |
331 We are happy you popped in! |
| 67 |
230 Welcome you silly person |
| 68 |
257 "/" is current directory |
| 69 |
250 CWD command successful. |
| 70 |
229 Entering Passive Mode (stripped) |
| 71 |
200 I modify TYPE as you wanted |
| 72 |
213 10 |
| 73 |
150 Binary data connection for 1352 () (10 bytes). |
| 74 |
226 File transfer complete |
| 75 |
</file2> |
| 76 |
<stripfile2> |
| 77 |
s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/ |
| 78 |
</stripfile2> |
| 79 |
|
| 80 |
</verify> |
| 81 |
</testcase> |