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