Imported Upstream version 7.59.0
[platform/upstream/curl.git] / tests / data / test1407
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 #
13 # Server-side
14 <reply>
15 <servercmd>
16 REPLY LIST +OK 1407 100\r\n.
17 </servercmd>
18 </reply>
19
20 #
21 # Client-side
22 <client>
23 <server>
24 pop3
25 </server>
26  <name>
27 --libcurl for POP3 LIST one message
28  </name>
29 <setenv>
30 SSL_CERT_FILE=
31 </setenv>
32 <command>
33 pop3://%HOSTIP:%POP3PORT/1407 -l -u user:secret --libcurl log/test1407.c
34 </command>
35 </client>
36
37 #
38 # Verify data after the test has been "shot"
39 <verify>
40 <protocol>
41 CAPA
42 USER user
43 PASS secret
44 LIST 1407
45 QUIT
46 </protocol>
47 <file name="log/test1407.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.haxx.se/libcurl/c/curl_easy_setopt.html
51  ************************************************************************/
52 #include <curl/curl.h>
53
54 int 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/1407");
62   curl_easy_setopt(hnd, CURLOPT_HEADER, 1L);
63   curl_easy_setopt(hnd, CURLOPT_DIRLISTONLY, 1L);
64   curl_easy_setopt(hnd, CURLOPT_USERPWD, "user:secret");
65   curl_easy_setopt(hnd, CURLOPT_VERBOSE, 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 select to either not use them or implement
70      them yourself.
71
72   CURLOPT_WRITEDATA set to a objectpointer
73   CURLOPT_INTERLEAVEDATA set to a objectpointer
74   CURLOPT_WRITEFUNCTION set to a functionpointer
75   CURLOPT_READDATA set to a objectpointer
76   CURLOPT_READFUNCTION set to a functionpointer
77   CURLOPT_SEEKDATA set to a objectpointer
78   CURLOPT_SEEKFUNCTION set to a functionpointer
79   CURLOPT_ERRORBUFFER set to a objectpointer
80   CURLOPT_STDERR set to a objectpointer
81   CURLOPT_DEBUGFUNCTION set to a functionpointer
82   CURLOPT_DEBUGDATA set to a objectpointer
83   CURLOPT_HEADERFUNCTION set to a functionpointer
84   CURLOPT_HEADERDATA set to a objectpointer
85
86   */
87
88   ret = curl_easy_perform(hnd);
89
90   curl_easy_cleanup(hnd);
91   hnd = NULL;
92
93   return (int)ret;
94 }
95 /**** End of sample code ****/
96 </file>
97 <stripfile>
98 # These options vary with configurations - just ignore them
99 $_ = '' if /CURLOPT_USERAGENT/
100 $_ = '' if /CURLOPT_MAXREDIRS/
101 $_ = '' if /CURLOPT_SSL_VERIFYPEER/
102 $_ = '' if /CURLOPT_SSH_KNOWNHOSTS/
103 $_ = '' if /CURLOPT_HTTP_VERSION/
104 </stripfile>
105 </verify>
106 </testcase>