tests 1356 to 1363: several -O -J -i -D combinations with FTP protocol
[platform/upstream/curl.git] / tests / data / test1359
1 <testcase>
2 <info>
3 <keywords>
4 FTP
5 RETR
6 </keywords>
7 </info>
8
9 # Server-side
10 <reply>
11 # file1359 contents...
12 <data nocheck="yes">
13 HTTP/1.1 200 OK
14 Date: Thu, 09 Nov 2010 14:49:00 GMT
15 Server: test-server/fake
16 Content-Length: 6
17 Connection: close
18 Content-Type: text/html
19 Content-Disposition: filename=name1359; charset=funny; option=strange
20
21 MOOOO
22 </data>
23 </reply>
24
25 # Client-side
26 <client>
27 # this relies on the debug feature to allow us to set directory to store the
28 # -O output in, using the CURL_TESTDIR variable
29 <features>
30 debug
31 </features>
32 <server>
33 ftp
34 </server>
35 <name>
36 FTP download file with C-D inside, using -O -J -D file
37 </name>
38 <setenv>
39 CURL_TESTDIR=%PWD/log
40 </setenv>
41 <command option="no-output,no-include">
42 ftp://%HOSTIP:%FTPPORT/path/file1359 -O -J -D log/heads1359
43 </command>
44 </client>
45
46 # Verify data after the test has been "shot"
47 <verify>
48 <protocol>
49 USER anonymous\r
50 PASS ftp@example.com\r
51 PWD\r
52 CWD path\r
53 EPSV\r
54 TYPE I\r
55 SIZE file1359\r
56 RETR file1359\r
57 QUIT\r
58 </protocol>
59
60 <file1 name="log/file1359">
61 HTTP/1.1 200 OK
62 Date: Thu, 09 Nov 2010 14:49:00 GMT
63 Server: test-server/fake
64 Content-Length: 6
65 Connection: close
66 Content-Type: text/html
67 Content-Disposition: filename=name1359; charset=funny; option=strange
68
69 MOOOO
70 </file1>
71
72 <file2 name="log/heads1359">
73 220-        _   _ ____  _     \r
74 220-    ___| | | |  _ \| |    \r
75 220-   / __| | | | |_) | |    \r
76 220-  | (__| |_| |  _ <| |___ \r
77 220    \___|\___/|_| \_\_____|\r
78 331 We are happy you popped in!\r
79 230 Welcome you silly person\r
80 257 "/" is current directory\r
81 250 CWD command successful.\r
82 229 Entering Passive Mode (stripped)
83 200 I modify TYPE as you wanted\r
84 213 214\r
85 150 Binary data connection for 1359 () (214 bytes).\r
86 226 File transfer complete\r
87 </file2>
88 <stripfile2>
89 s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/
90 </stripfile2>
91
92 <file3 name="log/stdout1359">
93 curl: Saved to filename '%PWD/log/file1359'
94 </file3>
95
96 <file4 name="log/name1359">
97 </file4>
98
99 </verify>
100 </testcase>