test1351 1.6 KB

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