2
0

test1392 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. <testcase>
  2. <info>
  3. <keywords>
  4. FTP
  5. RETR
  6. </keywords>
  7. </info>
  8. # Server-side
  9. <reply>
  10. # file1392 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=name1392; 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 -i -D stdout
  29. </name>
  30. <command option="no-output,no-include">
  31. ftp://%HOSTIP:%FTPPORT/path/file1392 -o log/download1392 -i -D -
  32. </command>
  33. <postcheck>
  34. perl %SRCDIR/libtest/notexists.pl log/file1392 log/name1392
  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 file1392
  47. RETR file1392
  48. QUIT
  49. </protocol>
  50. <file1 name="log/download1392">
  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=name1392; charset=funny; option=strange
  58. MOOOO
  59. </file1>
  60. <file2 name="log/stdout1392">
  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 1392 () (222 bytes).
  74. 226 File transfer complete
  75. </file2>
  76. <stripfile2>
  77. s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/
  78. </stripfile2>
  79. </verify>
  80. </testcase>