test1360 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. <testcase>
  2. <info>
  3. <keywords>
  4. FTP
  5. RETR
  6. -J
  7. </keywords>
  8. </info>
  9. # Server-side
  10. <reply>
  11. # file1360 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=name1360; 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 stdout
  35. </name>
  36. <setenv>
  37. CURL_TESTDIR=%PWD/log
  38. </setenv>
  39. <command option="no-output,no-include">
  40. ftp://%HOSTIP:%FTPPORT/path/file1360 -O -J -D -
  41. </command>
  42. <postcheck>
  43. perl %SRCDIR/libtest/notexists.pl log/name1360
  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 file1360
  56. RETR file1360
  57. QUIT
  58. </protocol>
  59. <file1 name="log/file1360">
  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=name1360; charset=funny; option=strange
  67. MOOOO
  68. </file1>
  69. <file2 name="log/stdout1360">
  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 1360 () (214 bytes).
  83. 226 File transfer complete
  84. </file2>
  85. <stripfile2>
  86. s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/
  87. </stripfile2>
  88. </verify>
  89. </testcase>