test1457 870 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <testcase>
  2. <info>
  3. <keywords>
  4. protocol
  5. --write-out
  6. </keywords>
  7. </info>
  8. # Server-side
  9. <reply>
  10. <data nocheck="yes">
  11. HTTP/1.1 200 OK
  12. Date: Thu, 09 Nov 2010 14:49:00 GMT
  13. Content-Length: 9
  14. Connection: close
  15. Content-Type: text/plain
  16. testdata
  17. </data>
  18. </reply>
  19. # Client-side
  20. <client>
  21. <server>
  22. http
  23. </server>
  24. <name>
  25. Check if %{stderr} and %{stdout} switch between stdout and stderr.
  26. </name>
  27. <command>
  28. http://%HOSTIP:%HTTPPORT/1457 --silent --write-out 'line1%{stderr}line2%{stdout}line3'
  29. </command>
  30. </client>
  31. # Verify data
  32. <verify>
  33. <stdout nonewline="yes">
  34. HTTP/1.1 200 OK
  35. Date: Thu, 09 Nov 2010 14:49:00 GMT
  36. Content-Length: 9
  37. Connection: close
  38. Content-Type: text/plain
  39. testdata
  40. line1line3
  41. </stdout>
  42. <stderr nonewline="yes">
  43. line2
  44. </stderr>
  45. <protocol>
  46. GET /1457 HTTP/1.1
  47. Host: %HOSTIP:%HTTPPORT
  48. Accept: */*
  49. </protocol>
  50. <strip>
  51. ^User-Agent:.*
  52. </strip>
  53. </verify>
  54. </testcase>