test972 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <testcase>
  2. <info>
  3. <keywords>
  4. HTTP
  5. HTTP GET
  6. </keywords>
  7. </info>
  8. #
  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. 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: 445
  19. Connection: close
  20. Content-Type: text/html
  21. Funny-head: yesyes
  22. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum
  23. </data>
  24. </reply>
  25. #
  26. # Client-side
  27. <client>
  28. <precheck>
  29. /usr/bin/which jsonlint-php >log/%TESTNUMBER-check
  30. </precheck>
  31. <server>
  32. http
  33. </server>
  34. <features>
  35. debug
  36. proxy
  37. </features>
  38. <setenv>
  39. CURL_TIME=13
  40. CURL_DEBUG_SIZE=4019
  41. CURL_VERSION=curl-unit-test-fake-version
  42. </setenv>
  43. <name>
  44. Verify JSON output
  45. </name>
  46. <command option="no-include">
  47. http://%HOSTIP:%HTTPPORT/%TESTNUMBER -s --write-out '%{json}' -o log/out972 | jsonlint-php -q
  48. </command>
  49. </client>
  50. #
  51. # Verify data after the test has been "shot"
  52. <verify>
  53. <protocol>
  54. GET /%TESTNUMBER HTTP/1.1
  55. Host: %HOSTIP:%HTTPPORT
  56. User-Agent: curl/%VERSION
  57. Accept: */*
  58. </protocol>
  59. </verify>
  60. </testcase>