xf.li | 6c8fc1e | 2023-08-12 00:11:09 -0700 | [diff] [blame^] | 1 | <testcase> |
| 2 | <info> |
| 3 | <keywords> |
| 4 | FTP |
| 5 | RETR |
| 6 | </keywords> |
| 7 | </info> |
| 8 | |
| 9 | # Server-side |
| 10 | <reply> |
| 11 | # file%TESTNUMBER contents... |
| 12 | <data nocheck="yes"> |
| 13 | HTTP/1.1 200 OK
|
| 14 | Date: Tue, 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=name%TESTNUMBER; 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 -i, without -D |
| 37 | </name> |
| 38 | <setenv> |
| 39 | CURL_TESTDIR=%PWD/log |
| 40 | </setenv> |
| 41 | <command option="no-output,no-include"> |
| 42 | ftp://%HOSTIP:%FTPPORT/path/file%TESTNUMBER -O -i |
| 43 | </command> |
| 44 | <postcheck> |
| 45 | perl %SRCDIR/libtest/notexists.pl log/name%TESTNUMBER |
| 46 | </postcheck> |
| 47 | </client> |
| 48 | |
| 49 | # Verify data after the test has been "shot" |
| 50 | <verify> |
| 51 | <protocol> |
| 52 | USER anonymous
|
| 53 | PASS ftp@example.com
|
| 54 | PWD
|
| 55 | CWD path
|
| 56 | EPSV
|
| 57 | TYPE I
|
| 58 | SIZE file%TESTNUMBER
|
| 59 | RETR file%TESTNUMBER
|
| 60 | QUIT
|
| 61 | </protocol> |
| 62 | |
| 63 | <file1 name="log/file%TESTNUMBER"> |
| 64 | HTTP/1.1 200 OK
|
| 65 | Date: Tue, 09 Nov 2010 14:49:00 GMT
|
| 66 | Server: test-server/fake
|
| 67 | Content-Length: 6
|
| 68 | Connection: close
|
| 69 | Content-Type: text/html
|
| 70 | Content-Disposition: filename=name%TESTNUMBER; charset=funny; option=strange
|
| 71 |
|
| 72 | MOOOO |
| 73 | </file1> |
| 74 | |
| 75 | <file2 name="log/stdout%TESTNUMBER"> |
| 76 | </file2> |
| 77 | |
| 78 | </verify> |
| 79 | </testcase> |