d81265e01c69d2b83af8d7b2ca74674fa2f923ca
[platform/upstream/curl.git] / tests / data / test1351
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 file
30 </name>
31 <setenv>
32 CURL_TESTDIR=%PWD/log
33 </setenv>
34 <command option="no-output,no-include">
35 ftp://%HOSTIP:%FTPPORT/path/file1351 -O -J -D log/heads1351
36 </command>
37 </client>
38
39 # Verify data after the test has been "shot"
40 <verify>
41 <protocol>
42 USER anonymous\r
43 PASS ftp@example.com\r
44 PWD\r
45 CWD path\r
46 EPSV\r
47 TYPE I\r
48 SIZE file1351\r
49 RETR file1351\r
50 QUIT\r
51 </protocol>
52
53 <file1 name="log/file1351">
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/heads1351">
61 220-        _   _ ____  _     \r
62 220-    ___| | | |  _ \| |    \r
63 220-   / __| | | | |_) | |    \r
64 220-  | (__| |_| |  _ <| |___ \r
65 220    \___|\___/|_| \_\_____|\r
66 331 We are happy you popped in!\r
67 230 Welcome you silly person\r
68 257 "/" is current directory\r
69 250 CWD command successful.\r
70 229 Entering Passive Mode (stripped)
71 200 I modify TYPE as you wanted\r
72 213 10\r
73 150 Binary data connection for 1351 () (10 bytes).\r
74 226 File transfer complete\r
75 </file2>
76 <stripfile2>
77 s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/
78 </stripfile2>
79
80 <file3 name="log/stdout1351">
81 </file3>
82
83 </verify>
84 </testcase>