xf.li | 6c8fc1e | 2023-08-12 00:11:09 -0700 | [diff] [blame^] | 1 | <testcase> |
| 2 | <info> |
| 3 | <keywords> |
| 4 | FTP |
| 5 | EPSV |
| 6 | RETR |
| 7 | --remote-time |
| 8 | </keywords> |
| 9 | </info> |
| 10 | # Server-side |
| 11 | <reply> |
| 12 | <data> |
| 13 | file data |
| 14 | </data> |
| 15 | <mdtm> |
| 16 | 213 20090213233130 |
| 17 | </mdtm> |
| 18 | </reply> |
| 19 | |
| 20 | # Client-side |
| 21 | <client> |
| 22 | <server> |
| 23 | ftp |
| 24 | </server> |
| 25 | <name> |
| 26 | FTP with --remote-time |
| 27 | </name> |
| 28 | <command> |
| 29 | ftp://%HOSTIP:%FTPPORT/%TESTNUMBER --remote-time |
| 30 | </command> |
| 31 | # Verify the mtime of the file. The mtime is specifically chosen to be an even |
| 32 | # number so that it can be represented exactly on a FAT filesystem. |
| 33 | <postcheck> |
| 34 | perl -e 'exit((stat("log/curl%TESTNUMBER.out"))[9] != 1234567890)' |
| 35 | </postcheck> |
| 36 | </client> |
| 37 | |
| 38 | # Verify data after the test has been "shot" |
| 39 | <verify> |
| 40 | <protocol> |
| 41 | USER anonymous
|
| 42 | PASS ftp@example.com
|
| 43 | PWD
|
| 44 | MDTM %TESTNUMBER
|
| 45 | EPSV
|
| 46 | TYPE I
|
| 47 | SIZE %TESTNUMBER
|
| 48 | RETR %TESTNUMBER
|
| 49 | QUIT
|
| 50 | </protocol> |
| 51 | </verify> |
| 52 | </testcase> |