Imported Upstream version 7.59.0
[platform/upstream/curl.git] / tests / data / test1406
index 0ccb08a..dab8ffb 100644 (file)
@@ -11,9 +11,9 @@ SMTP
 #
 # Server-side
 <reply>
-<servercmd>\r
-CAPA SIZE\r
-</servercmd>\r
+<servercmd>
+CAPA SIZE
+</servercmd>
 </reply>
 
 #
@@ -25,11 +25,14 @@ smtp
  <name>
 --libcurl for SMTP
  </name>
+<setenv>
+SSL_CERT_FILE=
+</setenv>
 <file name="log/test1406.eml">
-From: different\r
-To: another\r
-\r
-body\r
+From: different
+To: another
+
+body
 </file>
  <command>
 smtp://%HOSTIP:%SMTPPORT/1406 --mail-rcpt recipient.one@example.com --mail-rcpt recipient.two@example.com --mail-from sender@example.com -T log/test1406.eml --libcurl log/test1406.c
@@ -40,19 +43,19 @@ smtp://%HOSTIP:%SMTPPORT/1406 --mail-rcpt recipient.one@example.com --mail-rcpt
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-EHLO 1406\r
-MAIL FROM:<sender@example.com> SIZE=38\r
-RCPT TO:<recipient.one@example.com>\r
-RCPT TO:<recipient.two@example.com>\r
-DATA\r
-QUIT\r
+EHLO 1406
+MAIL FROM:<sender@example.com> SIZE=38
+RCPT TO:<recipient.one@example.com>
+RCPT TO:<recipient.two@example.com>
+DATA
+QUIT
 </protocol>
 <upload>
-From: different\r
-To: another\r
-\r
-body\r
-.\r
+From: different
+To: another
+
+body
+.
 </upload>
 <file name="log/test1406.c" mode="text">
 /********* Sample code generated by the curl command line tool **********
@@ -72,12 +75,11 @@ int main(int argc, char *argv[])
   slist1 = curl_slist_append(slist1, "recipient.two@example.com");
 
   hnd = curl_easy_init();
+  curl_easy_setopt(hnd, CURLOPT_BUFFERSIZE, 102400L);
   curl_easy_setopt(hnd, CURLOPT_INFILESIZE_LARGE, (curl_off_t)38);
   curl_easy_setopt(hnd, CURLOPT_URL, "smtp://%HOSTIP:%SMTPPORT/1406");
   curl_easy_setopt(hnd, CURLOPT_HEADER, 1L);
   curl_easy_setopt(hnd, CURLOPT_UPLOAD, 1L);
-  curl_easy_setopt(hnd, CURLOPT_USERAGENT, "stripped");
-  curl_easy_setopt(hnd, CURLOPT_MAXREDIRS, 50L);
   curl_easy_setopt(hnd, CURLOPT_VERBOSE, 1L);
   curl_easy_setopt(hnd, CURLOPT_TCP_KEEPALIVE, 1L);
   curl_easy_setopt(hnd, CURLOPT_MAIL_FROM, "sender@example.com");
@@ -115,10 +117,9 @@ int main(int argc, char *argv[])
 /**** End of sample code ****/
 </file>
 <stripfile>
-# curl's default user-agent varies with version, libraries etc.
-s/(USERAGENT, \")[^\"]+/${1}stripped/
-# CURLOPT_SSL_VERIFYPEER, SSH_KNOWNHOSTS and HTTP_VERSION vary with
-# configurations - just ignore them
+# These options vary with configurations - just ignore them
+$_ = '' if /CURLOPT_USERAGENT/
+$_ = '' if /CURLOPT_MAXREDIRS/
 $_ = '' if /CURLOPT_SSL_VERIFYPEER/
 $_ = '' if /CURLOPT_SSH_KNOWNHOSTS/
 $_ = '' if /CURLOPT_HTTP_VERSION/