test1387 1.7 KB

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