test1353 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. <testcase>
  2. <info>
  3. <keywords>
  4. FTP
  5. RETR
  6. </keywords>
  7. </info>
  8. # Server-side
  9. <reply>
  10. <data nocheck="yes">
  11. fooo
  12. mooo
  13. </data>
  14. </reply>
  15. # Client-side
  16. <client>
  17. # this relies on the debug feature to allow us to set directory to store the
  18. # -O output in, using the CURL_TESTDIR variable
  19. <features>
  20. debug
  21. </features>
  22. <server>
  23. ftp
  24. </server>
  25. <name>
  26. FTP download, file without C-D inside, using -O -i -D file
  27. </name>
  28. <setenv>
  29. CURL_TESTDIR=%PWD/log
  30. </setenv>
  31. <command option="no-output,no-include">
  32. ftp://%HOSTIP:%FTPPORT/path/file1353 -O -i -D log/heads1353
  33. </command>
  34. </client>
  35. # Verify data after the test has been "shot"
  36. <verify>
  37. <protocol>
  38. USER anonymous
  39. PASS ftp@example.com
  40. PWD
  41. CWD path
  42. EPSV
  43. TYPE I
  44. SIZE file1353
  45. RETR file1353
  46. QUIT
  47. </protocol>
  48. <file1 name="log/file1353">
  49. fooo
  50. mooo
  51. </file1>
  52. # The final "221 bye bye baby" response to QUIT will not be recorded
  53. # since that is not considered part of this particular transfer!
  54. <file2 name="log/heads1353">
  55. 220- _ _ ____ _
  56. 220- ___| | | | _ \| |
  57. 220- / __| | | | |_) | |
  58. 220- | (__| |_| | _ {| |___
  59. 220 \___|\___/|_| \_\_____|
  60. 331 We are happy you popped in!
  61. 230 Welcome you silly person
  62. 257 "/" is current directory
  63. 250 CWD command successful.
  64. 229 Entering Passive Mode (stripped)
  65. 200 I modify TYPE as you wanted
  66. 213 10
  67. 150 Binary data connection for 1353 () (10 bytes).
  68. 226 File transfer complete
  69. </file2>
  70. <stripfile2>
  71. s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/
  72. </stripfile2>
  73. <file3 name="log/stdout1353">
  74. </file3>
  75. </verify>
  76. </testcase>