test1407 2.8 KB

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