test101 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <testcase>
  2. <info>
  3. <keywords>
  4. FTP
  5. PORT
  6. LIST
  7. </keywords>
  8. </info>
  9. # Server-side
  10. <reply>
  11. # When doing LIST, we get the default list output hard-coded in the test
  12. # FTP server
  13. <datacheck mode="text">
  14. total 20
  15. drwxr-xr-x 8 98 98 512 Oct 22 13:06 .
  16. drwxr-xr-x 8 98 98 512 Oct 22 13:06 ..
  17. drwxr-xr-x 2 98 98 512 May 2 1996 .NeXT
  18. -r--r--r-- 1 0 1 35 Jul 16 1996 README
  19. lrwxrwxrwx 1 0 1 7 Dec 9 1999 bin -> usr/bin
  20. dr-xr-xr-x 2 0 1 512 Oct 1 1997 dev
  21. drwxrwxrwx 2 98 98 512 May 29 16:04 download.html
  22. dr-xr-xr-x 2 0 1 512 Nov 30 1995 etc
  23. drwxrwxrwx 2 98 1 512 Oct 30 14:33 pub
  24. dr-xr-xr-x 5 0 1 512 Oct 1 1997 usr
  25. </datacheck>
  26. </reply>
  27. # Client-side
  28. <client>
  29. <server>
  30. ftp
  31. </server>
  32. <name>
  33. FTP dir list, PORT with specified IP
  34. </name>
  35. <command>
  36. ftp://%HOSTIP:%FTPPORT/ -P %CLIENTIP
  37. </command>
  38. </client>
  39. # Verify data after the test has been "shot"
  40. <verify>
  41. # Strip all valid kinds of PORT and EPRT that curl can send
  42. <strip>
  43. ^PORT \d{1,3},\d{1,3},\d{1,3},\d{1,3},\d{1,3},\d{1,3}
  44. ^EPRT \|1\|\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\|\d{1,5}\|
  45. </strip>
  46. <protocol>
  47. USER anonymous
  48. PASS ftp@example.com
  49. PWD
  50. PORT 127,0,0,1,243,212
  51. TYPE A
  52. LIST
  53. QUIT
  54. </protocol>
  55. </verify>
  56. </testcase>