← Commit list

3d42510118

Viktor Szakats
Viktor Szakats
2025-11-13
SUCCESS Duration: 227s

Subject

runtests: allow `client/command` to span multiple lines, and use it

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

docs/tests/FILEFORMAT.md+3 -0
@@ -579,6 +579,9 @@ deleted.
### `<command [option="no-q/no-output/no-include/force-output/binary-trace"] [timeout="secs"][delay="secs"][type="perl/shell"]>`
Command line to run.
+If the command spans multiple lines, they are concatenated with a space added
+between them.
+
Note that the URL that gets passed to the server actually controls what data
that is returned. The last slash in the URL must be followed by a number. That
number (N) is used by the test-server to load test case N and return the data
tests/data/test1133+6 -1
@@ -29,7 +29,12 @@ http
HTTP RFC1867-type formposting with filename/data contains ',', ';', '"'
</name>
<command>
-http://%HOSTIP:%HTTPPORT/we/want/%TESTNUMBER -F "file=@\"%LOGDIR/test%TESTNUMBER,and;.txt\";type=mo/foo;filename=\"faker,and;.txt\"" -F 'file2=@"%LOGDIR/test%TESTNUMBER,and;.txt"' -F 'file3=@"%LOGDIR/test%TESTNUMBER,and;.txt";type=m/f,"%LOGDIR/test%TESTNUMBER,and;.txt"' -F a="{\"field1\":\"value1\",\"field2\":\"value2\"}" -F 'b=" \\value1;type=\"whatever\" "; type=text/foo; charset=utf-8 ; filename=param_b'
+http://%HOSTIP:%HTTPPORT/we/want/%TESTNUMBER
+-F "file=@\"%LOGDIR/test%TESTNUMBER,and;.txt\";type=mo/foo;filename=\"faker,and;.txt\""
+-F 'file2=@"%LOGDIR/test%TESTNUMBER,and;.txt"'
+-F 'file3=@"%LOGDIR/test%TESTNUMBER,and;.txt";type=m/f,"%LOGDIR/test%TESTNUMBER,and;.txt"'
+-F a="{\"field1\":\"value1\",\"field2\":\"value2\"}"
+-F 'b=" \\value1;type=\"whatever\" "; type=text/foo; charset=utf-8 ; filename=param_b'
</command>
# We create this file before the command is invoked!
<file name="%LOGDIR/test%TESTNUMBER,and;.txt">
tests/data/test1158+4 -1
@@ -30,7 +30,10 @@ http
HTTP RFC1867-type formposting with filename containing '"'
</name>
<command>
-http://%HOSTIP:%HTTPPORT/we/want/%TESTNUMBER -F "file=@\"%LOGDIR/test%TESTNUMBER\\\".txt\";type=mo/foo;filename=\"test%TESTNUMBER\\\".txt\"" -F 'file2=@"%LOGDIR/test%TESTNUMBER\".txt"' -F 'file3=@"%LOGDIR/test%TESTNUMBER\".txt";type=m/f,"%LOGDIR/test%TESTNUMBER\".txt"'
+http://%HOSTIP:%HTTPPORT/we/want/%TESTNUMBER
+-F "file=@\"%LOGDIR/test%TESTNUMBER\\\".txt\";type=mo/foo;filename=\"test%TESTNUMBER\\\".txt\""
+-F 'file2=@"%LOGDIR/test%TESTNUMBER\".txt"'
+-F 'file3=@"%LOGDIR/test%TESTNUMBER\".txt";type=m/f,"%LOGDIR/test%TESTNUMBER\".txt"'
</command>
# We create this file before the command is invoked!
<file name=%LOGDIR/test%TESTNUMBER".txt>
tests/data/test1186+4 -1
@@ -30,7 +30,10 @@ http
Multipart formposting with backslash-escaping filename containing '"'
</name>
<command>
-http://%HOSTIP:%HTTPPORT/we/want/%TESTNUMBER --form-escape -F "file=@\"%LOGDIR/test%TESTNUMBER\\\".txt\";type=mo/foo;filename=\"test%TESTNUMBER\\\".txt\"" -F 'file2=@"%LOGDIR/test%TESTNUMBER\".txt"' -F 'file3=@"%LOGDIR/test%TESTNUMBER\".txt";type=m/f,"%LOGDIR/test%TESTNUMBER\".txt"'
+http://%HOSTIP:%HTTPPORT/we/want/%TESTNUMBER --form-escape
+-F "file=@\"%LOGDIR/test%TESTNUMBER\\\".txt\";type=mo/foo;filename=\"test%TESTNUMBER\\\".txt\""
+-F 'file2=@"%LOGDIR/test%TESTNUMBER\".txt"'
+-F 'file3=@"%LOGDIR/test%TESTNUMBER\".txt";type=m/f,"%LOGDIR/test%TESTNUMBER\".txt"'
</command>
# We create this file before the command is invoked!
<file name=%LOGDIR/test%TESTNUMBER".txt>
tests/data/test1189+9 -1
@@ -29,7 +29,15 @@ http
Multipart formposting with backslash-escaping of name= and filename=
</name>
<command>
-http://%HOSTIP:%HTTPPORT/we/want/%TESTNUMBER --form-escape -F name=daniel -F tool=curl --form-string "str1=@literal" --form-string "str2=<verbatim;type=xxx/yyy" -F "file=@%LOGDIR/test%TESTNUMBER.txt;type=moo/foobar;filename=fakerfile" -F file2=@%LOGDIR/test%TESTNUMBER.txt -F "file3=@\"%LOGDIR/test%TESTNUMBER.txt\";type=mo/foo;filename=\"f\\\\\\\\ak\\\\\\er,\\\\an\\d;.t\\\"xt\"" -F 'file4=@"%LOGDIR/test%TESTNUMBER.txt"; filename="A\\AA\"\"\\\"ZZZ"'
+http://%HOSTIP:%HTTPPORT/we/want/%TESTNUMBER --form-escape
+-F name=daniel
+-F tool=curl
+--form-string "str1=@literal"
+--form-string "str2=<verbatim;type=xxx/yyy"
+-F "file=@%LOGDIR/test%TESTNUMBER.txt;type=moo/foobar;filename=fakerfile"
+-F file2=@%LOGDIR/test%TESTNUMBER.txt
+-F "file3=@\"%LOGDIR/test%TESTNUMBER.txt\";type=mo/foo;filename=\"f\\\\\\\\ak\\\\\\er,\\\\an\\d;.t\\\"xt\""
+-F 'file4=@"%LOGDIR/test%TESTNUMBER.txt"; filename="A\\AA\"\"\\\"ZZZ"'
</command>
# We create this file before the command is invoked!
<file name="%LOGDIR/test%TESTNUMBER.txt">
tests/data/test1294+2 -1
@@ -44,7 +44,8 @@ HTTP GET with split initial request send
CURL_SMALLREQSEND=128
</setenv>
<command>
-http://%HOSTIP:%HTTPPORT/%repeat[30 x 012345679]%/%TESTNUMBER -H "Among other public buildings in a certain town, which for many reasons it will be prudent to refrain from mentioning, and to which I will assign no fictitious name, there is one anciently common to most towns, great or small to ___, a workhouse; and in this workhouse was born; on a day and date which I need not trouble myself to repeat, inasmuch as it can be of no possible consequence to the reader, in this stage of the business at all events; the item of mortality whose name is prefixed to the head of this chapter: 511"
+http://%HOSTIP:%HTTPPORT/%repeat[30 x 012345679]%/%TESTNUMBER
+-H "Among other public buildings in a certain town, which for many reasons it will be prudent to refrain from mentioning, and to which I will assign no fictitious name, there is one anciently common to most towns, great or small to ___, a workhouse; and in this workhouse was born; on a day and date which I need not trouble myself to repeat, inasmuch as it can be of no possible consequence to the reader, in this stage of the business at all events; the item of mortality whose name is prefixed to the head of this chapter: 511"
</command>
</client>
tests/data/test1295+3 -1
@@ -44,7 +44,9 @@ HTTP POST with split initial request send
CURL_SMALLREQSEND=100
</setenv>
<command>
-http://%HOSTIP:%HTTPPORT/%repeat[30 x 012345679]%/%TESTNUMBER -H "%repeat[30 x 012345679]%: 300" -d "Mr. Sherlock Holmes, who was usually very late in the mornings, save upon those not infrequent occasions when he was up all night, was seated at the breakfast table." -w '%{size_upload}\n'
+http://%HOSTIP:%HTTPPORT/%repeat[30 x 012345679]%/%TESTNUMBER -H "%repeat[30 x 012345679]%: 300"
+-d "Mr. Sherlock Holmes, who was usually very late in the mornings, save upon those not infrequent occasions when he was up all night, was seated at the breakfast table."
+-w '%{size_upload}\n'
</command>
</client>
tests/data/test1404+4 -1
@@ -37,7 +37,10 @@ http
SSL_CERT_FILE
</setenv>
<command>
-http://%HOSTIP:%HTTPPORT/we/want/%TESTNUMBER -F name=value -F 'file=@%LOGDIR/test%TESTNUMBER.txt,%LOGDIR/test%TESTNUMBER.txt;type=magic/content;encoder=8bit,%LOGDIR/test%TESTNUMBER.txt;headers=X-testheader-1: header 1;headers=X-testheader-2: header 2' --libcurl %LOGDIR/test%TESTNUMBER.c
+http://%HOSTIP:%HTTPPORT/we/want/%TESTNUMBER
+-F name=value
+-F 'file=@%LOGDIR/test%TESTNUMBER.txt,%LOGDIR/test%TESTNUMBER.txt;type=magic/content;encoder=8bit,%LOGDIR/test%TESTNUMBER.txt;headers=X-testheader-1: header 1;headers=X-testheader-2: header 2'
+--libcurl %LOGDIR/test%TESTNUMBER.c
</command>
# We create this file before the command is invoked!
<file name="%LOGDIR/test%TESTNUMBER.txt">
tests/data/test1583+2 -1
@@ -23,7 +23,8 @@ sftp
SFTP dir and empty file
</name>
<command>
---key %LOGDIR/server/curl_client_key --pubkey %LOGDIR/server/curl_client_key.pub -u %USER: --insecure sftp://%HOSTIP:%SSHPORT%SFTP_PWD/%LOGDIR/test%TESTNUMBER.dir/ --next --key %LOGDIR/server/curl_client_key --pubkey %LOGDIR/server/curl_client_key.pub -u %USER: --insecure sftp://%HOSTIP:%SSHPORT%SFTP_PWD/%LOGDIR/test%TESTNUMBER.dir/emptyfile.txt
+--key %LOGDIR/server/curl_client_key --pubkey %LOGDIR/server/curl_client_key.pub -u %USER: --insecure sftp://%HOSTIP:%SSHPORT%SFTP_PWD/%LOGDIR/test%TESTNUMBER.dir/ --next
+--key %LOGDIR/server/curl_client_key --pubkey %LOGDIR/server/curl_client_key.pub -u %USER: --insecure sftp://%HOSTIP:%SSHPORT%SFTP_PWD/%LOGDIR/test%TESTNUMBER.dir/emptyfile.txt
</command>
</client>
tests/data/test2003+8 -1
@@ -58,7 +58,14 @@ tftp
HTTP GET, FTP RETR, FILE, TFTP RRQ then again in rev order
</name>
<command option="no-include">
-http://%HOSTIP:%HTTPPORT/%TESTNUMBER0001 ftp://%HOSTIP:%FTPPORT/%TESTNUMBER0002 file://localhost%FILE_PWD/%LOGDIR/test%TESTNUMBER.txt tftp://%HOSTIP:%TFTPPORT//%TESTNUMBER0003 tftp://%HOSTIP:%TFTPPORT//%TESTNUMBER0003 file://localhost%FILE_PWD/%LOGDIR/test%TESTNUMBER.txt ftp://%HOSTIP:%FTPPORT/%TESTNUMBER0002 http://%HOSTIP:%HTTPPORT/%TESTNUMBER0001
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER0001
+ftp://%HOSTIP:%FTPPORT/%TESTNUMBER0002
+file://localhost%FILE_PWD/%LOGDIR/test%TESTNUMBER.txt
+tftp://%HOSTIP:%TFTPPORT//%TESTNUMBER0003
+tftp://%HOSTIP:%TFTPPORT//%TESTNUMBER0003
+file://localhost%FILE_PWD/%LOGDIR/test%TESTNUMBER.txt
+ftp://%HOSTIP:%FTPPORT/%TESTNUMBER0002
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER0001
</command>
<file name="%LOGDIR/test%TESTNUMBER.txt">
foo
tests/data/test2004+8 -1
@@ -30,7 +30,14 @@ sftp
TFTP RRQ, SFTP, FILE, SCP retrieval then in rev order
</name>
<command option="no-include">
---key %LOGDIR/server/curl_client_key --pubkey %LOGDIR/server/curl_client_key.pub -u %USER: tftp://%HOSTIP:%TFTPPORT//%TESTNUMBER sftp://%HOSTIP:%SSHPORT%SFTP_PWD/%LOGDIR/test%TESTNUMBER.txt file://localhost%FILE_PWD/%LOGDIR/test%TESTNUMBER.txt scp://%HOSTIP:%SSHPORT%SCP_PWD/%LOGDIR/test%TESTNUMBER.txt file://localhost%FILE_PWD/%LOGDIR/test%TESTNUMBER.txt sftp://%HOSTIP:%SSHPORT%SFTP_PWD/%LOGDIR/test%TESTNUMBER.txt tftp://%HOSTIP:%TFTPPORT//%TESTNUMBER --insecure
+--key %LOGDIR/server/curl_client_key --pubkey %LOGDIR/server/curl_client_key.pub -u %USER:
+tftp://%HOSTIP:%TFTPPORT//%TESTNUMBER
+sftp://%HOSTIP:%SSHPORT%SFTP_PWD/%LOGDIR/test%TESTNUMBER.txt
+file://localhost%FILE_PWD/%LOGDIR/test%TESTNUMBER.txt
+scp://%HOSTIP:%SSHPORT%SCP_PWD/%LOGDIR/test%TESTNUMBER.txt
+file://localhost%FILE_PWD/%LOGDIR/test%TESTNUMBER.txt
+sftp://%HOSTIP:%SSHPORT%SFTP_PWD/%LOGDIR/test%TESTNUMBER.txt
+tftp://%HOSTIP:%TFTPPORT//%TESTNUMBER --insecure
</command>
<file name="%LOGDIR/test%TESTNUMBER.txt">
This is test data
tests/data/test2049+4 -1
@@ -31,7 +31,10 @@ Connect to specific host
</name>
<command>
-http://www1.example.com:8081/%TESTNUMBER --connect-to ::%HOSTIP:%HTTPPORT --next http://www2.example.com:8082/%TESTNUMBER --connect-to :8082:%HOSTIP:%HTTPPORT --next http://www3.example.com:8083/%TESTNUMBER --connect-to www3.example.com::%HOSTIP:%HTTPPORT --next http://www4.example.com:8084/%TESTNUMBER --connect-to www4.example.com:8084:%HOSTIP:%HTTPPORT
+http://www1.example.com:8081/%TESTNUMBER --connect-to ::%HOSTIP:%HTTPPORT --next
+http://www2.example.com:8082/%TESTNUMBER --connect-to :8082:%HOSTIP:%HTTPPORT --next
+http://www3.example.com:8083/%TESTNUMBER --connect-to www3.example.com::%HOSTIP:%HTTPPORT --next
+http://www4.example.com:8084/%TESTNUMBER --connect-to www4.example.com:8084:%HOSTIP:%HTTPPORT
</command>
</client>
tests/data/test2051+3 -1
@@ -31,7 +31,9 @@ Connect to specific host: Reuse existing connections if possible
</name>
<command>
-http://%HOSTIP:%HTTPPORT/%TESTNUMBER -w "%{num_connects}\n" --next --connect-to ::%HOSTIP:%HTTPPORT http://%HOSTIP:%HTTPPORT/%TESTNUMBER -w "%{num_connects}\n" --next http://%HOSTIP:%HTTPPORT/%TESTNUMBER -w "%{num_connects}\n"
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -w "%{num_connects}\n" --next --connect-to ::%HOSTIP:%HTTPPORT
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -w "%{num_connects}\n" --next
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -w "%{num_connects}\n"
</command>
</client>
tests/data/test2052+5 -1
@@ -32,7 +32,11 @@ http
</name>
<command>
-http://www.example.com:%HTTPPORT/%TESTNUMBER --resolve www.example.com:%HTTPPORT:%HOSTIP -w "%{num_connects}\n" --next --resolve -www.example.com:%HTTPPORT --connect-to ::%HOSTIP:%HTTPPORT http://www.example.com:%HTTPPORT/%TESTNUMBER -w "%{num_connects}\n"
+http://www.example.com:%HTTPPORT/%TESTNUMBER
+--resolve www.example.com:%HTTPPORT:%HOSTIP -w "%{num_connects}\n"
+--next
+--resolve -www.example.com:%HTTPPORT --connect-to ::%HOSTIP:%HTTPPORT
+http://www.example.com:%HTTPPORT/%TESTNUMBER -w "%{num_connects}\n"
</command>
</client>
tests/data/test2053+2 -1
@@ -31,7 +31,8 @@ Connect to specific host with IP addresses
</name>
<command>
-http://10.0.0.1:8081/%TESTNUMBER --connect-to 10.0.0.1:8081:%HOSTIP:%HTTPPORT --next http://[fc00::1]:8082/%TESTNUMBER --connect-to [fc00::1]:8082:%HOSTIP:%HTTPPORT
+http://10.0.0.1:8081/%TESTNUMBER --connect-to 10.0.0.1:8081:%HOSTIP:%HTTPPORT --next
+http://[fc00::1]:8082/%TESTNUMBER --connect-to [fc00::1]:8082:%HOSTIP:%HTTPPORT
</command>
</client>
tests/data/test2054+15 -1
@@ -31,7 +31,21 @@ Connect to specific host: use the first "connect-to" string that matches
</name>
<command>
-http://%HOSTIP:%HTTPPORT/%TESTNUMBER --connect-to foo::bar: --connect-to :123::456 --next http://www.example.com:%HTTPPORT/%TESTNUMBER --connect-to www.example.com::%HOSTIP: --connect-to www.example.com::foo: --next http://%HOSTIP:8083/%TESTNUMBER --connect-to :8083::%HTTPPORT --connect-to :8083::123 --next http://www.example.com:8084/%TESTNUMBER --connect-to www.example.com:8084:%HOSTIP:%HTTPPORT --connect-to www.example.com:8084:foo:123
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER
+--connect-to foo::bar:
+--connect-to :123::456
+--next
+http://www.example.com:%HTTPPORT/%TESTNUMBER
+--connect-to www.example.com::%HOSTIP:
+--connect-to www.example.com::foo:
+--next
+http://%HOSTIP:8083/%TESTNUMBER
+--connect-to :8083::%HTTPPORT
+--connect-to :8083::123
+--next
+http://www.example.com:8084/%TESTNUMBER
+--connect-to www.example.com:8084:%HOSTIP:%HTTPPORT
+--connect-to www.example.com:8084:foo:123
</command>
</client>
tests/data/test3002+9 -1
@@ -26,7 +26,15 @@ To: another
body
</stdin>
<command>
-smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER --mail-rcpt-allowfails --mail-rcpt invalid.one --mail-rcpt [email protected] --mail-rcpt [email protected] --mail-rcpt [email protected] --mail-rcpt [email protected] --mail-from [email protected] -T -
+smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER
+--mail-rcpt-allowfails
+--mail-rcpt invalid.one
+--mail-rcpt [email protected]
+--mail-rcpt [email protected]
+--mail-rcpt [email protected]
+--mail-rcpt [email protected]
+--mail-from [email protected]
+-T -
</command>
</client>
tests/data/test3003+9 -1
@@ -26,7 +26,15 @@ To: another
body
</stdin>
<command>
-smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER --mail-rcpt-allowfails --mail-rcpt [email protected] --mail-rcpt [email protected] --mail-rcpt [email protected] --mail-rcpt [email protected] --mail-rcpt invalid.five --mail-from [email protected] -T -
+smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER
+--mail-rcpt-allowfails
+--mail-rcpt [email protected]
+--mail-rcpt [email protected]
+--mail-rcpt [email protected]
+--mail-rcpt [email protected]
+--mail-rcpt invalid.five
+--mail-from [email protected]
+-T -
</command>
</client>
tests/data/test3004+9 -1
@@ -26,7 +26,15 @@ To: another
body
</stdin>
<command>
-smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER --mail-rcpt-allowfails --mail-rcpt [email protected] --mail-rcpt [email protected] --mail-rcpt invalid.three --mail-rcpt [email protected] --mail-rcpt [email protected] --mail-from [email protected] -T -
+smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER
+--mail-rcpt-allowfails
+--mail-rcpt [email protected]
+--mail-rcpt [email protected]
+--mail-rcpt invalid.three
+--mail-rcpt [email protected]
+--mail-rcpt [email protected]
+--mail-from [email protected]
+-T -
</command>
</client>
tests/data/test3005+9 -1
@@ -26,7 +26,15 @@ To: another
body
</stdin>
<command>
-smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER --mail-rcpt-allowfails --mail-rcpt invalid.one --mail-rcpt [email protected] --mail-rcpt invalid.three --mail-rcpt invalid.four --mail-rcpt invalid.five --mail-from [email protected] -T -
+smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER
+--mail-rcpt-allowfails
+--mail-rcpt invalid.one
+--mail-rcpt [email protected]
+--mail-rcpt invalid.three
+--mail-rcpt invalid.four
+--mail-rcpt invalid.five
+--mail-from [email protected]
+-T -
</command>
</client>
tests/data/test3006+9 -1
@@ -26,7 +26,15 @@ To: another
body
</stdin>
<command>
-smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER --mail-rcpt-allowfails --mail-rcpt invalid.one --mail-rcpt invalid.two --mail-rcpt invalid.three --mail-rcpt invalid.four --mail-rcpt invalid.five --mail-from [email protected] -T -
+smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER
+--mail-rcpt-allowfails
+--mail-rcpt invalid.one
+--mail-rcpt invalid.two
+--mail-rcpt invalid.three
+--mail-rcpt invalid.four
+--mail-rcpt invalid.five
+--mail-from [email protected]
+-T -
</command>
</client>
tests/data/test3007+5 -1
@@ -26,7 +26,11 @@ To: another
body
</stdin>
<command>
-smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER --mail-rcpt-allowfails --mail-rcpt invalid.one --mail-from [email protected] -T -
+smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER
+--mail-rcpt-allowfails
+--mail-rcpt invalid.one
+--mail-from [email protected]
+-T -
</command>
</client>
tests/data/test3029+2 -1
@@ -23,7 +23,8 @@ http
HTTP with multiple -D
</name>
<command>
--D %LOGDIR/heads%TESTNUMBER http://%HOSTIP:%HTTPPORT/%TESTNUMBER http://%HOSTIP:%HTTPPORT/%TESTNUMBER --next -D %LOGDIR/heads%TESTNUMBER http://%HOSTIP:%HTTPPORT/%TESTNUMBER
+-D %LOGDIR/heads%TESTNUMBER http://%HOSTIP:%HTTPPORT/%TESTNUMBER http://%HOSTIP:%HTTPPORT/%TESTNUMBER --next
+-D %LOGDIR/heads%TESTNUMBER http://%HOSTIP:%HTTPPORT/%TESTNUMBER
</command>
</client>
tests/data/test39+9 -1
@@ -29,7 +29,15 @@ http
HTTP RFC1867-type formposting with filename= and type=
</name>
<command>
-http://%HOSTIP:%HTTPPORT/we/want/%TESTNUMBER -F name=daniel -F tool=curl --form-string "str1=@literal" --form-string "str2=<verbatim;type=xxx/yyy" -F "file=@%LOGDIR/test%TESTNUMBER.txt;type=moo/foobar;filename=fakerfile" -F file2=@%LOGDIR/test%TESTNUMBER.txt -F "file3=@\"%LOGDIR/test%TESTNUMBER.txt\";type=mo/foo;filename=\"f\\\\\\\\ak\\\\\\er,\\\\an\\d;.t\\\"xt\"" -F 'file4=@"%LOGDIR/test%TESTNUMBER.txt"; filename="A\\AA\"\"\\\"ZZZ"'
+http://%HOSTIP:%HTTPPORT/we/want/%TESTNUMBER
+-F name=daniel
+-F tool=curl
+--form-string "str1=@literal"
+--form-string "str2=<verbatim;type=xxx/yyy"
+-F "file=@%LOGDIR/test%TESTNUMBER.txt;type=moo/foobar;filename=fakerfile"
+-F file2=@%LOGDIR/test%TESTNUMBER.txt
+-F "file3=@\"%LOGDIR/test%TESTNUMBER.txt\";type=mo/foo;filename=\"f\\\\\\\\ak\\\\\\er,\\\\an\\d;.t\\\"xt\""
+-F 'file4=@"%LOGDIR/test%TESTNUMBER.txt"; filename="A\\AA\"\"\\\"ZZZ"'
</command>
# We create this file before the command is invoked!
<file name="%LOGDIR/test%TESTNUMBER.txt">
tests/data/test4+11 -1
@@ -30,7 +30,17 @@ http
Replaced internal and added custom HTTP headers
</name>
<command>
- -H "extra-header: here" -H "Accept: replaced" -H "X-Custom-Header;" -H "X-Test: foo; " -H "X-Test:" -H "X-Test2: foo;" -H "X-Test3: " -H "X-Test4; " -H "X-Test5;ignored" http://%HOSTIP:%HTTPPORT/%TESTNUMBER http://%HOSTIP:%HTTPPORT/%TESTNUMBER
+-H "extra-header: here"
+-H "Accept: replaced"
+-H "X-Custom-Header;"
+-H "X-Test: foo; "
+-H "X-Test:"
+-H "X-Test2: foo;"
+-H "X-Test3: "
+-H "X-Test4; "
+-H "X-Test5;ignored"
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER
</command>
</client>
tests/data/test423+5 -1
@@ -34,7 +34,11 @@ http
-w with url.* variables
</name>
<command option="no-include">
-"http://uuuu:pppp@%HOSTIP:%HTTPPORT/%TESTNUMBER?qqqq#ffff" "h55p://hello2000:1/%TESTNUMBER?qqqq#ffff" "local host" "http://u22u:p22p@%HOSTIP:%HTTPPORT/%TESTNUMBER?qqqq#ffff" -w '%{url.host}+%{url.path}+%{url.scheme}+%{url.user}+%{url.password}+%{url.port}+%{url.query}+%{url.fragment}\n'
+"http://uuuu:pppp@%HOSTIP:%HTTPPORT/%TESTNUMBER?qqqq#ffff"
+"h55p://hello2000:1/%TESTNUMBER?qqqq#ffff"
+"local host"
+"http://u22u:p22p@%HOSTIP:%HTTPPORT/%TESTNUMBER?qqqq#ffff"
+-w '%{url.host}+%{url.path}+%{url.scheme}+%{url.user}+%{url.password}+%{url.port}+%{url.query}+%{url.fragment}\n'
</command>
</client>
tests/data/test424+6 -1
@@ -51,7 +51,12 @@ http
-w with urle.* variables
</name>
<command option="no-include">
-"http://uuuu:pppp@%HOSTIP:%HTTPPORT/%TESTNUMBER?qqqq#ffff" "h55p://hello2000:1/%TESTNUMBER?qqqq#ffff" "local host" "http://u22u:p22p@%HOSTIP:%HTTPPORT/%TESTNUMBER?qqqq#ffff" -w '%{urle.host}+%{urle.path}+%{urle.scheme}+%{urle.user}+%{urle.password}+%{urle.port}+%{urle.query}+%{urle.fragment}\n' -x http://%HOSTIP:%HTTPPORT/ -L
+"http://uuuu:pppp@%HOSTIP:%HTTPPORT/%TESTNUMBER?qqqq#ffff"
+"h55p://hello2000:1/%TESTNUMBER?qqqq#ffff"
+"local host"
+"http://u22u:p22p@%HOSTIP:%HTTPPORT/%TESTNUMBER?qqqq#ffff"
+-w '%{urle.host}+%{urle.path}+%{urle.scheme}+%{urle.user}+%{urle.password}+%{urle.port}+%{urle.query}+%{urle.fragment}\n'
+-x http://%HOSTIP:%HTTPPORT/ -L
</command>
</client>
tests/data/test618+3 -1
@@ -15,7 +15,9 @@ sftp
SFTP retrieval of two files
</name>
<command>
---key %LOGDIR/server/curl_client_key --pubkey %LOGDIR/server/curl_client_key.pub -u %USER: sftp://%HOSTIP:%SSHPORT%SFTP_PWD/%LOGDIR/file%TESTNUMBER.txt sftp://%HOSTIP:%SSHPORT%SFTP_PWD/%LOGDIR/file%TESTNUMBER.txt --insecure
+--key %LOGDIR/server/curl_client_key --pubkey %LOGDIR/server/curl_client_key.pub -u %USER:
+sftp://%HOSTIP:%SSHPORT%SFTP_PWD/%LOGDIR/file%TESTNUMBER.txt
+sftp://%HOSTIP:%SSHPORT%SFTP_PWD/%LOGDIR/file%TESTNUMBER.txt --insecure
</command>
<file name="%LOGDIR/file%TESTNUMBER.txt">
Test data
tests/data/test619+3 -1
@@ -15,7 +15,9 @@ scp
SCP retrieval of two files
</name>
<command>
---key %LOGDIR/server/curl_client_key --pubkey %LOGDIR/server/curl_client_key.pub -u %USER: scp://%HOSTIP:%SSHPORT%SCP_PWD/%LOGDIR/file%TESTNUMBER.txt scp://%HOSTIP:%SSHPORT%SCP_PWD/%LOGDIR/file%TESTNUMBER.txt --insecure
+--key %LOGDIR/server/curl_client_key --pubkey %LOGDIR/server/curl_client_key.pub -u %USER:
+scp://%HOSTIP:%SSHPORT%SCP_PWD/%LOGDIR/file%TESTNUMBER.txt
+scp://%HOSTIP:%SSHPORT%SCP_PWD/%LOGDIR/file%TESTNUMBER.txt --insecure
</command>
<file name="%LOGDIR/file%TESTNUMBER.txt">
Test data
tests/data/test62+4 -1
@@ -29,7 +29,10 @@ http
HTTP, send cookies when using custom Host:
</name>
<command>
-http://%HOSTIP:%HTTPPORT/we/want/%TESTNUMBER http://%HOSTIP:%HTTPPORT/we/want/%TESTNUMBER?hoge=fuga -b %LOGDIR/jar%TESTNUMBER.txt -H "Host: www.host.foo.com"
+http://%HOSTIP:%HTTPPORT/we/want/%TESTNUMBER
+http://%HOSTIP:%HTTPPORT/we/want/%TESTNUMBER?hoge=fuga
+-b %LOGDIR/jar%TESTNUMBER.txt
+-H "Host: www.host.foo.com"
</command>
<file name="%LOGDIR/jar%TESTNUMBER.txt">
# Netscape HTTP Cookie File
tests/data/test625+4 -1
@@ -22,7 +22,10 @@ sftp
SFTP put with --ftp-create-dirs twice
</name>
<command>
---ftp-create-dirs --key %LOGDIR/server/curl_client_key --pubkey %LOGDIR/server/curl_client_key.pub -u %USER: -T %LOGDIR/file%TESTNUMBER.txt sftp://%HOSTIP:%SSHPORT%SFTP_PWD/%LOGDIR/test%TESTNUMBER.a/upload.%TESTNUMBER -T %LOGDIR/file%TESTNUMBER.txt sftp://%HOSTIP:%SSHPORT%SFTP_PWD/%LOGDIR/test%TESTNUMBER.b/upload.%TESTNUMBER --insecure
+--ftp-create-dirs
+--key %LOGDIR/server/curl_client_key --pubkey %LOGDIR/server/curl_client_key.pub -u %USER:
+-T %LOGDIR/file%TESTNUMBER.txt sftp://%HOSTIP:%SSHPORT%SFTP_PWD/%LOGDIR/test%TESTNUMBER.a/upload.%TESTNUMBER
+-T %LOGDIR/file%TESTNUMBER.txt sftp://%HOSTIP:%SSHPORT%SFTP_PWD/%LOGDIR/test%TESTNUMBER.b/upload.%TESTNUMBER --insecure
</command>
<file name="%LOGDIR/file%TESTNUMBER.txt">
Test data
tests/data/test646+11 -1
@@ -30,7 +30,17 @@ To: another
body
</stdin>
<command>
-smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER --mail-rcpt [email protected] --mail-from [email protected] -F "=(;type=multipart/alternative" -F "= <body>This is the html version</body>;headers=X-test1: this is a header;type=text/html;headers=X-test2: this is another header " -F "=This is the plain text version;headers=@%LOGDIR/headers%TESTNUMBER" -F "=)" -F "=@%LOGDIR/test%TESTNUMBER.txt;headers=<%LOGDIR/headers%TESTNUMBER" -H "From: different" -H "To: another" -H "Reply-To: <[email protected]>"
+smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER
+--mail-rcpt [email protected]
+--mail-from [email protected]
+-F "=(;type=multipart/alternative"
+-F "= <body>This is the html version</body>;headers=X-test1: this is a header;type=text/html;headers=X-test2: this is another header "
+-F "=This is the plain text version;headers=@%LOGDIR/headers%TESTNUMBER"
+-F "=)"
+-F "=@%LOGDIR/test%TESTNUMBER.txt;headers=<%LOGDIR/headers%TESTNUMBER"
+-H "From: different"
+-H "To: another"
+-H "Reply-To: <[email protected]>"
</command>
<file1 name="%LOGDIR/test%TESTNUMBER.txt">
This is an attached file.
tests/data/test647+12 -1
@@ -26,7 +26,18 @@ imap
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 <[email protected]>" -H "To: [email protected]" -H "Message-Id: <[email protected]>" -H "Subject: afternoon meeting" -u user:secret
+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 <[email protected]>"
+-H "To: [email protected]"
+-H "Message-Id: <[email protected]>"
+-H "Subject: afternoon meeting"
+-u user:secret
</command>
<file name="%LOGDIR/test%TESTNUMBER.txt">
This is an attached file.
tests/data/test648+7 -1
@@ -30,7 +30,13 @@ To: another
body
</stdin>
<command>
-smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER --mail-rcpt [email protected] --mail-from [email protected] -F '=This is the email inline text with a very long line containing the special character = and that should be split by encoder.;headers=Content-disposition: "inline";encoder=quoted-printable' -F "=@%LOGDIR/test%TESTNUMBER.txt;encoder=base64" -H "From: different" -H "To: another"
+smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER
+--mail-rcpt [email protected]
+--mail-from [email protected]
+-F '=This is the email inline text with a very long line containing the special character = and that should be split by encoder.;headers=Content-disposition: "inline";encoder=quoted-printable'
+-F "=@%LOGDIR/test%TESTNUMBER.txt;encoder=base64"
+-H "From: different"
+-H "To: another"
</command>
<file name="%LOGDIR/test%TESTNUMBER.txt">
This is an attached file.
tests/data/test917+8 -1
@@ -26,7 +26,14 @@ To: another
body
</stdin>
<command>
-smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER --mail-rcpt [email protected] --mail-rcpt [email protected] --mail-rcpt [email protected] --mail-rcpt [email protected] --mail-rcpt [email protected] --mail-from [email protected] -T -
+smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER
+--mail-rcpt [email protected]
+--mail-rcpt [email protected]
+--mail-rcpt [email protected]
+--mail-rcpt [email protected]
+--mail-rcpt [email protected]
+--mail-from [email protected]
+-T -
</command>
</client>
tests/data/test918+8 -1
@@ -26,7 +26,14 @@ To: another
body
</stdin>
<command>
-smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER --mail-rcpt [email protected] --mail-rcpt invalid --mail-rcpt [email protected] --mail-rcpt sTrAnGe --mail-rcpt [email protected] --mail-from [email protected] -T -
+smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER
+--mail-rcpt [email protected]
+--mail-rcpt invalid
+--mail-rcpt [email protected]
+--mail-rcpt sTrAnGe
+--mail-rcpt [email protected]
+--mail-from [email protected]
+-T -
</command>
</client>
tests/data/test938+2 -1
@@ -34,7 +34,8 @@ SMTP multiple connection authentication
mail body
</file>
<command>
-smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER001 --mail-rcpt [email protected] --mail-from [email protected] -u user.one:secret -T %LOGDIR/upload%TESTNUMBER -: smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER002 --mail-rcpt [email protected] --mail-from [email protected] -u user.two:secret -T %LOGDIR/upload%TESTNUMBER
+smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER001 --mail-rcpt [email protected] --mail-from [email protected] -u user.one:secret -T %LOGDIR/upload%TESTNUMBER -:
+smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER002 --mail-rcpt [email protected] --mail-from [email protected] -u user.two:secret -T %LOGDIR/upload%TESTNUMBER
</command>
</client>
tests/runner.pm+6 -3
@@ -804,10 +804,13 @@ sub singletest_run {
my ($testnum, $testtimings) = @_;
# get the command line options to use
- my ($cmd, @blaha)= getpart("client", "command");
- if($cmd) {
- # make some nice replace operations
+ my $cmd;
+ my @cmd = getpart("client", "command");
+ if(@cmd) {
+ # allow splitting the command-line to multiple lines
+ $cmd = join(' ', @cmd);
$cmd =~ s/\n//g; # no newlines please
+ chomp $cmd; # no newlines please
# substitute variables in the command line
}
else {