blob: d5bfb7f5d3c4f812d97830e9ef8d39eec720b4dd [file] [log] [blame]
xf.li6c8fc1e2023-08-12 00:11:09 -07001<testcase>
2# Based on test851
3<info>
4<keywords>
5POP3
6Clear Text
7LIST
8--libcurl
9</keywords>
10</info>
11
12#
13# Server-side
14<reply>
15<servercmd>
16REPLY LIST +OK %TESTNUMBER 100\r\n.
17</servercmd>
18</reply>
19
20#
21# Client-side
22<client>
23<server>
24pop3
25</server>
26 <name>
27--libcurl for POP3 LIST one message
28 </name>
29<setenv>
30SSL_CERT_FILE=
31</setenv>
32<command>
33pop3://%HOSTIP:%POP3PORT/%TESTNUMBER -l -u user:secret --libcurl log/test%TESTNUMBER.c
34</command>
35</client>
36
37#
38# Verify data after the test has been "shot"
39<verify>
40<protocol>
41CAPA
42USER user
43PASS secret
44LIST %TESTNUMBER
45QUIT
46</protocol>
47<file name="log/test%TESTNUMBER.c" mode="text">
48/********* Sample code generated by the curl command line tool **********
49 * All curl_easy_setopt() options are documented at:
50 * https://curl.se/libcurl/c/curl_easy_setopt.html
51 ************************************************************************/
52#include <curl/curl.h>
53
54int main(int argc, char *argv[])
55{
56 CURLcode ret;
57 CURL *hnd;
58
59 hnd = curl_easy_init();
60 curl_easy_setopt(hnd, CURLOPT_BUFFERSIZE, 102400L);
61 curl_easy_setopt(hnd, CURLOPT_URL, "pop3://%HOSTIP:%POP3PORT/%TESTNUMBER");
62 curl_easy_setopt(hnd, CURLOPT_DIRLISTONLY, 1L);
63 curl_easy_setopt(hnd, CURLOPT_USERPWD, "user:secret");
64 curl_easy_setopt(hnd, CURLOPT_VERBOSE, 1L);
65 curl_easy_setopt(hnd, CURLOPT_FTP_SKIP_PASV_IP, 1L);
66 curl_easy_setopt(hnd, CURLOPT_TCP_KEEPALIVE, 1L);
67
68 /* Here is a list of options the curl code used that cannot get generated
69 as source easily. You may choose to either not use them or implement
70 them yourself.
71
72 CURLOPT_WRITEDATA was set to an object pointer
73 CURLOPT_WRITEFUNCTION was set to a function pointer
74 CURLOPT_READDATA was set to an object pointer
75 CURLOPT_READFUNCTION was set to a function pointer
76 CURLOPT_SEEKDATA was set to an object pointer
77 CURLOPT_SEEKFUNCTION was set to a function pointer
78 CURLOPT_ERRORBUFFER was set to an object pointer
79 CURLOPT_STDERR was set to an object pointer
80 CURLOPT_DEBUGFUNCTION was set to a function pointer
81 CURLOPT_DEBUGDATA was set to an object pointer
82 CURLOPT_HEADERFUNCTION was set to a function pointer
83 CURLOPT_HEADERDATA was set to an object pointer
84
85 */
86
87 ret = curl_easy_perform(hnd);
88
89 curl_easy_cleanup(hnd);
90 hnd = NULL;
91
92 return (int)ret;
93}
94/**** End of sample code ****/
95</file>
96<stripfile>
97# These options vary with configurations - just ignore them
98# CURLOPT_INTERLEAVEDATA requires RTSP (HTTP) protocol
99$_ = '' if /CURLOPT_USERAGENT/
100$_ = '' if /CURLOPT_MAXREDIRS/
101$_ = '' if /CURLOPT_SSL_VERIFYPEER/
102$_ = '' if /CURLOPT_SSH_KNOWNHOSTS/
103$_ = '' if /CURLOPT_HTTP_VERSION/
104$_ = '' if /CURLOPT_HTTP09_ALLOWED/
105$_ = '' if /CURLOPT_INTERLEAVEDATA/
106</stripfile>
107</verify>
108</testcase>