test1389 1.9 KB

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