2
0

test1407 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  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 %TESTNUMBER 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. <setenv>
  28. SSL_CERT_FILE=
  29. </setenv>
  30. <command>
  31. pop3://%HOSTIP:%POP3PORT/%TESTNUMBER -l -u user:secret --libcurl log/test%TESTNUMBER.c
  32. </command>
  33. </client>
  34. #
  35. # Verify data after the test has been "shot"
  36. <verify>
  37. <protocol>
  38. CAPA
  39. USER user
  40. PASS secret
  41. LIST %TESTNUMBER
  42. QUIT
  43. </protocol>
  44. <file name="log/test%TESTNUMBER.c" mode="text">
  45. /********* Sample code generated by the curl command line tool **********
  46. * All curl_easy_setopt() options are documented at:
  47. * https://curl.se/libcurl/c/curl_easy_setopt.html
  48. ************************************************************************/
  49. #include <curl/curl.h>
  50. int main(int argc, char *argv[])
  51. {
  52. CURLcode ret;
  53. CURL *hnd;
  54. hnd = curl_easy_init();
  55. curl_easy_setopt(hnd, CURLOPT_BUFFERSIZE, 102400L);
  56. curl_easy_setopt(hnd, CURLOPT_URL, "pop3://%HOSTIP:%POP3PORT/%TESTNUMBER");
  57. curl_easy_setopt(hnd, CURLOPT_DIRLISTONLY, 1L);
  58. curl_easy_setopt(hnd, CURLOPT_USERPWD, "user:secret");
  59. curl_easy_setopt(hnd, CURLOPT_VERBOSE, 1L);
  60. curl_easy_setopt(hnd, CURLOPT_FTP_SKIP_PASV_IP, 1L);
  61. curl_easy_setopt(hnd, CURLOPT_TCP_KEEPALIVE, 1L);
  62. /* Here is a list of options the curl code used that cannot get generated
  63. as source easily. You may choose to either not use them or implement
  64. them yourself.
  65. CURLOPT_WRITEDATA set to a objectpointer
  66. CURLOPT_WRITEFUNCTION set to a functionpointer
  67. CURLOPT_READDATA set to a objectpointer
  68. CURLOPT_READFUNCTION set to a functionpointer
  69. CURLOPT_SEEKDATA set to a objectpointer
  70. CURLOPT_SEEKFUNCTION set to a functionpointer
  71. CURLOPT_ERRORBUFFER set to a objectpointer
  72. CURLOPT_STDERR set to a objectpointer
  73. CURLOPT_DEBUGFUNCTION set to a functionpointer
  74. CURLOPT_DEBUGDATA set to a objectpointer
  75. CURLOPT_HEADERFUNCTION set to a functionpointer
  76. CURLOPT_HEADERDATA set to a objectpointer
  77. */
  78. ret = curl_easy_perform(hnd);
  79. curl_easy_cleanup(hnd);
  80. hnd = NULL;
  81. return (int)ret;
  82. }
  83. /**** End of sample code ****/
  84. </file>
  85. <stripfile>
  86. # These options vary with configurations - just ignore them
  87. # CURLOPT_INTERLEAVEDATA requires RTSP (HTTP) protocol
  88. $_ = '' if /CURLOPT_USERAGENT/
  89. $_ = '' if /CURLOPT_MAXREDIRS/
  90. $_ = '' if /CURLOPT_SSL_VERIFYPEER/
  91. $_ = '' if /CURLOPT_SSH_KNOWNHOSTS/
  92. $_ = '' if /CURLOPT_HTTP_VERSION/
  93. $_ = '' if /CURLOPT_HTTP09_ALLOWED/
  94. $_ = '' if /CURLOPT_INTERLEAVEDATA/
  95. </stripfile>
  96. </verify>
  97. </testcase>