2
0

test1407 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. <testcase>
  2. # Based on test851
  3. <info>
  4. <keywords>
  5. POP3
  6. Clear Text
  7. LIST
  8. --libcurl
  9. </keywords>
  10. </info>
  11. #
  12. # Server-side
  13. <reply>
  14. <servercmd>
  15. REPLY LIST +OK 1407 100\r\n.
  16. </servercmd>
  17. </reply>
  18. #
  19. # Client-side
  20. <client>
  21. <server>
  22. pop3
  23. </server>
  24. <name>
  25. --libcurl for POP3 LIST one message
  26. </name>
  27. <command>
  28. pop3://%HOSTIP:%POP3PORT/1407 -l -u user:secret --libcurl log/test1407.c
  29. </command>
  30. </client>
  31. #
  32. # Verify data after the test has been "shot"
  33. <verify>
  34. <protocol>
  35. CAPA
  36. USER user
  37. PASS secret
  38. LIST 1407
  39. QUIT
  40. </protocol>
  41. <file name="log/test1407.c" mode="text">
  42. /********* Sample code generated by the curl command line tool **********
  43. * All curl_easy_setopt() options are documented at:
  44. * http://curl.haxx.se/libcurl/c/curl_easy_setopt.html
  45. ************************************************************************/
  46. #include <curl/curl.h>
  47. int main(int argc, char *argv[])
  48. {
  49. CURLcode ret;
  50. CURL *hnd;
  51. hnd = curl_easy_init();
  52. curl_easy_setopt(hnd, CURLOPT_URL, "pop3://%HOSTIP:%POP3PORT/1407");
  53. curl_easy_setopt(hnd, CURLOPT_HEADER, 1L);
  54. curl_easy_setopt(hnd, CURLOPT_DIRLISTONLY, 1L);
  55. curl_easy_setopt(hnd, CURLOPT_USERPWD, "user:secret");
  56. curl_easy_setopt(hnd, CURLOPT_USERAGENT, "stripped");
  57. curl_easy_setopt(hnd, CURLOPT_MAXREDIRS, 50L);
  58. curl_easy_setopt(hnd, CURLOPT_VERBOSE, 1L);
  59. curl_easy_setopt(hnd, CURLOPT_TCP_KEEPALIVE, 1L);
  60. /* Here is a list of options the curl code used that cannot get generated
  61. as source easily. You may select to either not use them or implement
  62. them yourself.
  63. CURLOPT_WRITEDATA set to a objectpointer
  64. CURLOPT_WRITEFUNCTION set to a functionpointer
  65. CURLOPT_READDATA set to a objectpointer
  66. CURLOPT_READFUNCTION set to a functionpointer
  67. CURLOPT_SEEKDATA set to a objectpointer
  68. CURLOPT_SEEKFUNCTION set to a functionpointer
  69. CURLOPT_ERRORBUFFER set to a objectpointer
  70. CURLOPT_STDERR set to a objectpointer
  71. CURLOPT_DEBUGFUNCTION set to a functionpointer
  72. CURLOPT_DEBUGDATA set to a objectpointer
  73. CURLOPT_HEADERFUNCTION set to a functionpointer
  74. CURLOPT_HEADERDATA set to a objectpointer
  75. */
  76. ret = curl_easy_perform(hnd);
  77. curl_easy_cleanup(hnd);
  78. hnd = NULL;
  79. return (int)ret;
  80. }
  81. /**** End of sample code ****/
  82. </file>
  83. <stripfile>
  84. # curl's default user-agent varies with version, libraries etc.
  85. s/(USERAGENT, \")[^\"]+/${1}stripped/
  86. # CURLOPT_SSL_VERIFYPEER and SSH_KNOWNHOSTS vary with configurations - just
  87. # ignore them
  88. $_ = '' if /CURLOPT_SSL_VERIFYPEER/
  89. $_ = '' if /CURLOPT_SSH_KNOWNHOSTS/
  90. </stripfile>
  91. </verify>
  92. </testcase>