aa54f2d07e700b1419e2fab62114e3b90ed6b1ea
[platform/upstream/curl.git] / tests / data / test1354
1 <testcase>
2 <info>
3 <keywords>
4 FTP
5 RETR
6 </keywords>
7 </info>
8
9 # Server-side
10 <reply>
11 <data nocheck="yes">
12 fooo
13 mooo
14 </data>
15 </reply>
16
17 # Client-side
18 <client>
19 # this relies on the debug feature to allow us to set directory to store the
20 # -O output in, using the CURL_TESTDIR variable
21 <features>
22 debug
23 </features>
24 <server>
25 ftp
26 </server>
27 <name>
28 FTP download, file without C-D inside, using -O -i -D stdout
29 </name>
30 <setenv>
31 CURL_TESTDIR=%PWD/log
32 </setenv>
33 <command option="no-output,no-include">
34 ftp://%HOSTIP:%FTPPORT/path/file1354 -O -i -D -
35 </command>
36 </client>
37
38 # Verify data after the test has been "shot"
39 <verify>
40 <protocol>
41 USER anonymous\r
42 PASS ftp@example.com\r
43 PWD\r
44 CWD path\r
45 EPSV\r
46 TYPE I\r
47 SIZE file1354\r
48 RETR file1354\r
49 QUIT\r
50 </protocol>
51
52 <file1 name="log/file1354">
53 fooo
54 mooo
55 </file1>
56
57 <file2 name="log/stdout1354">
58 220-        _   _ ____  _     \r
59 220-    ___| | | |  _ \| |    \r
60 220-   / __| | | | |_) | |    \r
61 220-  | (__| |_| |  _ <| |___ \r
62 220    \___|\___/|_| \_\_____|\r
63 331 We are happy you popped in!\r
64 230 Welcome you silly person\r
65 257 "/" is current directory\r
66 250 CWD command successful.\r
67 229 Entering Passive Mode (stripped)
68 200 I modify TYPE as you wanted\r
69 213 10\r
70 150 Binary data connection for 1354 () (10 bytes).\r
71 226 File transfer complete\r
72 </file2>
73 <stripfile2>
74 s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/
75 </stripfile2>
76
77 </verify>
78 </testcase>