test1457 883 B

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