test2019 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. <testcase>
  2. <info>
  3. <keywords>
  4. Metalink
  5. HTTP
  6. HTTP GET
  7. </keywords>
  8. </info>
  9. #
  10. # Server-side
  11. <reply>
  12. <data nocheck="yes">
  13. HTTP/1.1 200 OK
  14. Date: Wed, 20 Jun 2012 14:49:00 GMT
  15. Server: test-server/fake
  16. Content-Length: 56
  17. Connection: close
  18. Content-Type: text/html
  19. Content-Disposition: filename=name2019; charset=funny; option=strange
  20. Funny-head: yesyes
  21. Data that should not be delivered from an HTTP resource
  22. </data>
  23. </reply>
  24. #
  25. # Client-side
  26. <client>
  27. <server>
  28. http
  29. </server>
  30. <features>
  31. file
  32. Metalink
  33. </features>
  34. <name>
  35. Metalink local XML file, attempt Unix questionable file name II
  36. </name>
  37. <command option="no-output,no-include">
  38. --metalink file://%PWD/log/test2019.metalink
  39. </command>
  40. # local metalink file written before test command runs
  41. <file name="log/test2019.metalink">
  42. <?xml version="1.0" encoding="utf-8"?>
  43. <metalink version="3.0" xmlns="http://www.metalinker.org/">
  44. <files>
  45. <file name=".">
  46. <verification>
  47. <hash type="sha256">c7d03debe90ca29492203ea921d76941fa98640cf3b744f2a16c9b58465eab82</hash>
  48. </verification>
  49. <resources maxconnections="1">
  50. <url type="http" preference="90">http://%HOSTIP:%HTTPPORT/2019</url>
  51. </resources>
  52. </file>
  53. </files>
  54. </metalink>
  55. </file>
  56. <postcheck>
  57. perl %SRCDIR/libtest/notexists.pl log/2019 log/name2019
  58. </postcheck>
  59. </client>
  60. #
  61. # Verify data after the test has been "shot"
  62. <verify>
  63. <file1 name="log/stdout2019">
  64. </file1>
  65. <file2 name="log/stderr2019">
  66. Metalink: parsing (file://%PWD/log/test2019.metalink) metalink/XML...
  67. Metalink: parsing (file://%PWD/log/test2019.metalink) WARNING (missing or invalid file name)
  68. Metalink: parsing (file://%PWD/log/test2019.metalink) FAILED
  69. </file2>
  70. <stripfile2>
  71. $_ = '' if (($_ !~ /^Metalink: /) && ($_ !~ /error/i) && ($_ !~ /warn/i))
  72. </stripfile2>
  73. </verify>
  74. </testcase>