Imported Upstream version 7.40.0
[platform/upstream/curl.git] / tests / data / test1390
1 <testcase>
2 <info>
3 <keywords>
4 FTP
5 RETR
6 -J
7 </keywords>
8 </info>
9
10 # Server-side
11 <reply>
12 # file1390 contents...
13 <data nocheck="yes">
14 HTTP/1.1 200 OK\r
15 Date: Thu, 09 Nov 2010 14:49:00 GMT\r
16 Server: test-server/fake\r
17 Content-Length: 6\r
18 Connection: close\r
19 Content-Type: text/html\r
20 Content-Disposition: filename=name1390; charset=funny; option=strange\r
21 \r
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 stdout
33 </name>
34 <command option="no-output,no-include">
35 ftp://%HOSTIP:%FTPPORT/path/file1390 -o log/download1390 -J -D -
36 </command>
37 <postcheck>
38 perl %SRCDIR/libtest/notexists.pl log/file1390 log/name1390
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 file1390\r
52 RETR file1390\r
53 QUIT\r
54 </protocol>
55
56 <file1 name="log/download1390">
57 HTTP/1.1 200 OK\r
58 Date: Thu, 09 Nov 2010 14:49:00 GMT\r
59 Server: test-server/fake\r
60 Content-Length: 6\r
61 Connection: close\r
62 Content-Type: text/html\r
63 Content-Disposition: filename=name1390; charset=funny; option=strange\r
64 \r
65 MOOOO
66 </file1>
67
68 <file2 name="log/stdout1390">
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 222\r
81 150 Binary data connection for 1390 () (222 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 </verify>
89 </testcase>