2
0

test1359 1.9 KB

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