test1148 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <testcase>
  2. <info>
  3. <keywords>
  4. HTTP
  5. progressbar
  6. </keywords>
  7. </info>
  8. #
  9. # Server-side
  10. <reply>
  11. <data>
  12. HTTP/1.1 200 OK
  13. Date: Tue, 09 Nov 2010 14:49:00 GMT
  14. Server: test-server/fake
  15. Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
  16. ETag: "21025-dc7-39462498"
  17. Accept-Ranges: bytes
  18. Content-Length: 60
  19. Connection: close
  20. Content-Type: text/html
  21. Funny-head: yesyes
  22. zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz
  23. </data>
  24. </reply>
  25. #
  26. # Client-side
  27. <client>
  28. <server>
  29. http
  30. </server>
  31. <name>
  32. progress-bar
  33. </name>
  34. <command>
  35. http://%HOSTIP:%HTTPPORT/%TESTNUMBER -# --stderr %LOGDIR/stderrlog%TESTNUMBER
  36. </command>
  37. <setenv>
  38. LC_ALL=
  39. LC_NUMERIC=en_US.UTF-8
  40. </setenv>
  41. </client>
  42. #
  43. <verify>
  44. <protocol>
  45. GET /%TESTNUMBER HTTP/1.1
  46. Host: %HOSTIP:%HTTPPORT
  47. User-Agent: curl/%VERSION
  48. Accept: */*
  49. </protocol>
  50. # Check that the progress finished at 100% and has the right bar width.
  51. # Note the dot in 100.0% is regex to match any character since different
  52. # locales use different separators.
  53. <file name="%LOGDIR/stderrlog%TESTNUMBER" mode="text">
  54. correct
  55. </file>
  56. <stripfile>
  57. s/.*\r#{72} 100.0%/correct/
  58. </stripfile>
  59. </verify>
  60. </testcase>