mirror of
https://github.com/curl/curl.git
synced 2026-04-13 00:31:41 +08:00
Some curl command-lines are long, often repetitive, and difficult to read or write: Before this patch (1 test == 1 line): - <=78 characters: 1099 tests - 79-132 characters: 500 tests - 133+ characters: 217 tests: patch meant to help with some of these. After this patch: - <=78 characters: 1288 lines - 79-132 characters: 526 lines - 133+ characters: 190 lines After this patch it's possible to fold long lines into multiple ones. Folding can reduce greppability, thus this is primarily useful for cases when the options are repetitive, e.g. a list of form options, headers, mail parameters and the like. Closes #19500
95 lines
2.0 KiB
Plaintext
95 lines
2.0 KiB
Plaintext
<testcase>
|
|
<info>
|
|
<keywords>
|
|
IMAP
|
|
APPEND
|
|
UPLOAD
|
|
MULTIPART
|
|
</keywords>
|
|
</info>
|
|
|
|
#
|
|
# Server-side
|
|
<reply>
|
|
</reply>
|
|
|
|
#
|
|
# Client-side
|
|
<client>
|
|
<features>
|
|
Mime
|
|
</features>
|
|
<server>
|
|
imap
|
|
</server>
|
|
<name>
|
|
IMAP APPEND multipart using mime API
|
|
</name>
|
|
<command>
|
|
imap://%HOSTIP:%IMAPPORT/%TESTNUMBER
|
|
-F "=(;type=multipart/alternative"
|
|
-F "= <body>This is the html version</body>;type=text/html"
|
|
-F "=This is the plain text version"
|
|
-F "=)"
|
|
-F "=@%LOGDIR/test%TESTNUMBER.txt"
|
|
-H "Date: Mon, 7 Feb 1994 21:52:25 -0800 (PST)"
|
|
-H "From: Fred Foobar <foobar@example.com>"
|
|
-H "To: joe@example.com"
|
|
-H "Message-Id: <B27397-0100000@example.com>"
|
|
-H "Subject: afternoon meeting"
|
|
-u user:secret
|
|
</command>
|
|
<file name="%LOGDIR/test%TESTNUMBER.txt">
|
|
This is an attached file.
|
|
|
|
It may contain any type of data.
|
|
</file>
|
|
</client>
|
|
|
|
#
|
|
# Verify data after the test has been "shot"
|
|
<verify>
|
|
<strippart>
|
|
s/^--------------------------[A-Za-z0-9]*/------------------------------/
|
|
s/boundary=------------------------[A-Za-z0-9]*/boundary=----------------------------/
|
|
</strippart>
|
|
<protocol crlf="yes">
|
|
A001 CAPABILITY
|
|
A002 LOGIN user secret
|
|
A003 APPEND %TESTNUMBER (\Seen) {940}
|
|
A004 LOGOUT
|
|
</protocol>
|
|
<upload>
|
|
Content-Type: multipart/mixed; boundary=----------------------------%CR
|
|
Mime-Version: 1.0%CR
|
|
Date: Mon, 7 Feb 1994 21:52:25 -0800 (PST)%CR
|
|
From: Fred Foobar <foobar@example.com>%CR
|
|
To: joe@example.com%CR
|
|
Message-Id: <B27397-0100000@example.com>%CR
|
|
Subject: afternoon meeting%CR
|
|
%CR
|
|
------------------------------%CR
|
|
Content-Type: multipart/alternative; boundary=----------------------------%CR
|
|
%CR
|
|
------------------------------%CR
|
|
Content-Type: text/html%CR
|
|
Content-Transfer-Encoding: 8bit%CR
|
|
%CR
|
|
<body>This is the html version</body>%CR
|
|
------------------------------%CR
|
|
%CR
|
|
This is the plain text version%CR
|
|
--------------------------------%CR
|
|
%CR
|
|
------------------------------%CR
|
|
Content-Disposition: attachment; filename="test%TESTNUMBER.txt"%CR
|
|
%CR
|
|
This is an attached file.
|
|
|
|
It may contain any type of data.
|
|
%CR
|
|
--------------------------------%CR
|
|
</upload>
|
|
</verify>
|
|
</testcase>
|