• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<testcase>
2<info>
3<keywords>
4FTP
5RETR
6</keywords>
7</info>
8
9# Server-side
10<reply>
11# file1387 contents...
12<data nocheck="yes">
13HTTP/1.1 200 OK
14Date: Thu, 09 Nov 2010 14:49:00 GMT
15Server: test-server/fake
16Content-Length: 6
17Connection: close
18Content-Type: text/html
19Content-Disposition: filename=name1387; charset=funny; option=strange
20
21MOOOO
22</data>
23</reply>
24
25# Client-side
26<client>
27<server>
28ftp
29</server>
30<name>
31FTP DL, file with C-D inside, using -o fname -D file
32</name>
33<command option="no-output,no-include">
34ftp://%HOSTIP:%FTPPORT/path/file1387 -o log/download1387 -D log/heads1387
35</command>
36<postcheck>
37perl %SRCDIR/libtest/notexists.pl log/file1387 log/name1387
38</postcheck>
39</client>
40
41# Verify data after the test has been "shot"
42<verify>
43<protocol>
44USER anonymous
45PASS ftp@example.com
46PWD
47CWD path
48EPSV
49TYPE I
50SIZE file1387
51RETR file1387
52QUIT
53</protocol>
54
55<file1 name="log/download1387">
56HTTP/1.1 200 OK
57Date: Thu, 09 Nov 2010 14:49:00 GMT
58Server: test-server/fake
59Content-Length: 6
60Connection: close
61Content-Type: text/html
62Content-Disposition: filename=name1387; charset=funny; option=strange
63
64MOOOO
65</file1>
66
67<file2 name="log/heads1387">
68220-        _   _ ____  _
69220-    ___| | | |  _ \| |
70220-   / __| | | | |_) | |
71220-  | (__| |_| |  _ {| |___
72220    \___|\___/|_| \_\_____|
73331 We are happy you popped in!
74230 Welcome you silly person
75257 "/" is current directory
76250 CWD command successful.
77229 Entering Passive Mode (stripped)
78200 I modify TYPE as you wanted
79213 222
80150 Binary data connection for 1387 () (222 bytes).
81226 File transfer complete
82</file2>
83<stripfile2>
84s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/
85</stripfile2>
86
87<file3 name="log/stdout1387">
88</file3>
89
90</verify>
91</testcase>
92