2012-02-23 13:48:46 +04:00
|
|
|
<testcase>
|
2014-03-23 16:30:02 +04:00
|
|
|
# Based on test851
|
2012-02-23 13:48:46 +04:00
|
|
|
<info>
|
|
|
|
<keywords>
|
|
|
|
POP3
|
2014-03-30 18:09:55 +04:00
|
|
|
Clear Text
|
2012-02-23 13:48:46 +04:00
|
|
|
LIST
|
|
|
|
--libcurl
|
|
|
|
</keywords>
|
|
|
|
</info>
|
|
|
|
|
|
|
|
#
|
|
|
|
# Server-side
|
|
|
|
<reply>
|
|
|
|
<servercmd>
|
2013-01-17 15:59:23 +04:00
|
|
|
REPLY LIST +OK 1407 100\r\n.
|
2012-02-23 13:48:46 +04:00
|
|
|
</servercmd>
|
|
|
|
</reply>
|
|
|
|
|
|
|
|
#
|
|
|
|
# Client-side
|
|
|
|
<client>
|
|
|
|
<server>
|
|
|
|
pop3
|
|
|
|
</server>
|
|
|
|
<name>
|
2014-03-23 16:16:40 +04:00
|
|
|
--libcurl for POP3 LIST one message
|
2012-02-23 13:48:46 +04:00
|
|
|
</name>
|
2017-03-13 00:33:56 +03:00
|
|
|
<setenv>
|
|
|
|
SSL_CERT_FILE=
|
|
|
|
</setenv>
|
|
|
|
<command>
|
2012-02-23 13:48:46 +04:00
|
|
|
pop3://%HOSTIP:%POP3PORT/1407 -l -u user:secret --libcurl log/test1407.c
|
|
|
|
</command>
|
|
|
|
</client>
|
|
|
|
|
|
|
|
#
|
|
|
|
# Verify data after the test has been "shot"
|
|
|
|
<verify>
|
|
|
|
<protocol>
|
2012-06-05 00:34:06 +04:00
|
|
|
CAPA
|
2012-02-24 02:13:42 +04:00
|
|
|
USER user
|
|
|
|
PASS secret
|
|
|
|
LIST 1407
|
|
|
|
QUIT
|
2012-02-23 13:48:46 +04:00
|
|
|
</protocol>
|
2012-03-18 08:56:07 +04:00
|
|
|
<file name="log/test1407.c" mode="text">
|
2012-02-23 13:48:46 +04:00
|
|
|
/********* Sample code generated by the curl command line tool **********
|
|
|
|
* All curl_easy_setopt() options are documented at:
|
2016-02-03 02:19:02 +03:00
|
|
|
* https://curl.haxx.se/libcurl/c/curl_easy_setopt.html
|
2012-02-23 13:48:46 +04:00
|
|
|
************************************************************************/
|
|
|
|
#include <curl/curl.h>
|
|
|
|
|
|
|
|
int main(int argc, char *argv[])
|
|
|
|
{
|
|
|
|
CURLcode ret;
|
|
|
|
CURL *hnd;
|
|
|
|
|
|
|
|
hnd = curl_easy_init();
|
2017-04-24 13:03:08 +03:00
|
|
|
curl_easy_setopt(hnd, CURLOPT_BUFFERSIZE, 102400L);
|
2012-02-23 13:48:46 +04:00
|
|
|
curl_easy_setopt(hnd, CURLOPT_URL, "pop3://%HOSTIP:%POP3PORT/1407");
|
|
|
|
curl_easy_setopt(hnd, CURLOPT_HEADER, 1L);
|
|
|
|
curl_easy_setopt(hnd, CURLOPT_DIRLISTONLY, 1L);
|
|
|
|
curl_easy_setopt(hnd, CURLOPT_USERPWD, "user:secret");
|
|
|
|
curl_easy_setopt(hnd, CURLOPT_VERBOSE, 1L);
|
|
|
|
curl_easy_setopt(hnd, CURLOPT_TCP_KEEPALIVE, 1L);
|
|
|
|
|
|
|
|
/* Here is a list of options the curl code used that cannot get generated
|
|
|
|
as source easily. You may select to either not use them or implement
|
|
|
|
them yourself.
|
|
|
|
|
|
|
|
CURLOPT_WRITEDATA set to a objectpointer
|
2016-10-18 15:10:59 +03:00
|
|
|
CURLOPT_INTERLEAVEDATA set to a objectpointer
|
2012-02-23 13:48:46 +04:00
|
|
|
CURLOPT_WRITEFUNCTION set to a functionpointer
|
|
|
|
CURLOPT_READDATA set to a objectpointer
|
|
|
|
CURLOPT_READFUNCTION set to a functionpointer
|
|
|
|
CURLOPT_SEEKDATA set to a objectpointer
|
|
|
|
CURLOPT_SEEKFUNCTION set to a functionpointer
|
|
|
|
CURLOPT_ERRORBUFFER set to a objectpointer
|
|
|
|
CURLOPT_STDERR set to a objectpointer
|
|
|
|
CURLOPT_DEBUGFUNCTION set to a functionpointer
|
|
|
|
CURLOPT_DEBUGDATA set to a objectpointer
|
2012-05-25 12:33:28 +04:00
|
|
|
CURLOPT_HEADERFUNCTION set to a functionpointer
|
|
|
|
CURLOPT_HEADERDATA set to a objectpointer
|
2012-02-23 13:48:46 +04:00
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
ret = curl_easy_perform(hnd);
|
|
|
|
|
|
|
|
curl_easy_cleanup(hnd);
|
|
|
|
hnd = NULL;
|
|
|
|
|
|
|
|
return (int)ret;
|
|
|
|
}
|
|
|
|
/**** End of sample code ****/
|
|
|
|
</file>
|
|
|
|
<stripfile>
|
2017-03-20 23:39:27 +03:00
|
|
|
# These options vary with configurations - just ignore them
|
|
|
|
$_ = '' if /CURLOPT_USERAGENT/
|
|
|
|
$_ = '' if /CURLOPT_MAXREDIRS/
|
2012-02-23 13:48:46 +04:00
|
|
|
$_ = '' if /CURLOPT_SSL_VERIFYPEER/
|
2012-02-24 02:13:42 +04:00
|
|
|
$_ = '' if /CURLOPT_SSH_KNOWNHOSTS/
|
2015-12-13 11:24:08 +03:00
|
|
|
$_ = '' if /CURLOPT_HTTP_VERSION/
|
2012-02-23 13:48:46 +04:00
|
|
|
</stripfile>
|
|
|
|
</verify>
|
|
|
|
</testcase>
|