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