From 3d42510118a9eba12a0d3cd4e23b84a1bccd9f2a Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Wed, 12 Nov 2025 17:26:27 +0100 Subject: [PATCH] runtests: allow `client/command` to span multiple lines, and use it 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 --- docs/tests/FILEFORMAT.md | 3 +++ tests/data/test1133 | 7 ++++++- tests/data/test1158 | 5 ++++- tests/data/test1186 | 5 ++++- tests/data/test1189 | 10 +++++++++- tests/data/test1294 | 3 ++- tests/data/test1295 | 4 +++- tests/data/test1404 | 5 ++++- tests/data/test1583 | 3 ++- tests/data/test2003 | 9 ++++++++- tests/data/test2004 | 9 ++++++++- tests/data/test2049 | 5 ++++- tests/data/test2051 | 4 +++- tests/data/test2052 | 6 +++++- tests/data/test2053 | 3 ++- tests/data/test2054 | 16 +++++++++++++++- tests/data/test3002 | 10 +++++++++- tests/data/test3003 | 10 +++++++++- tests/data/test3004 | 10 +++++++++- tests/data/test3005 | 10 +++++++++- tests/data/test3006 | 10 +++++++++- tests/data/test3007 | 6 +++++- tests/data/test3029 | 3 ++- tests/data/test39 | 10 +++++++++- tests/data/test4 | 12 +++++++++++- tests/data/test423 | 6 +++++- tests/data/test424 | 7 ++++++- tests/data/test618 | 4 +++- tests/data/test619 | 4 +++- tests/data/test62 | 5 ++++- tests/data/test625 | 5 ++++- tests/data/test646 | 12 +++++++++++- tests/data/test647 | 13 ++++++++++++- tests/data/test648 | 8 +++++++- tests/data/test917 | 9 ++++++++- tests/data/test918 | 9 ++++++++- tests/data/test938 | 3 ++- tests/runner.pm | 9 ++++++--- 38 files changed, 233 insertions(+), 39 deletions(-) diff --git a/docs/tests/FILEFORMAT.md b/docs/tests/FILEFORMAT.md index 8c4d0181e1..2e0648267e 100644 --- a/docs/tests/FILEFORMAT.md +++ b/docs/tests/FILEFORMAT.md @@ -579,6 +579,9 @@ deleted. ### `` 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 diff --git a/tests/data/test1133 b/tests/data/test1133 index a14dbe8ee9..37e48f8b55 100644 --- a/tests/data/test1133 +++ b/tests/data/test1133 @@ -29,7 +29,12 @@ http HTTP RFC1867-type formposting with filename/data contains ',', ';', '"' -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' # We create this file before the command is invoked! diff --git a/tests/data/test1158 b/tests/data/test1158 index bc9f2d5719..c2a7330fe6 100644 --- a/tests/data/test1158 +++ b/tests/data/test1158 @@ -30,7 +30,10 @@ http HTTP RFC1867-type formposting with filename containing '"' -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"' # We create this file before the command is invoked! diff --git a/tests/data/test1186 b/tests/data/test1186 index e3157f36ca..f9edac8f36 100644 --- a/tests/data/test1186 +++ b/tests/data/test1186 @@ -30,7 +30,10 @@ http Multipart formposting with backslash-escaping filename containing '"' -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"' # We create this file before the command is invoked! diff --git a/tests/data/test1189 b/tests/data/test1189 index 3e5748eafd..0fb354a88e 100644 --- a/tests/data/test1189 +++ b/tests/data/test1189 @@ -29,7 +29,15 @@ http Multipart formposting with backslash-escaping of name= and filename= -http://%HOSTIP:%HTTPPORT/we/want/%TESTNUMBER --form-escape -F name=daniel -F tool=curl --form-string "str1=@literal" --form-string "str2= # We create this file before the command is invoked! diff --git a/tests/data/test1294 b/tests/data/test1294 index e759397001..0e3eff5dea 100644 --- a/tests/data/test1294 +++ b/tests/data/test1294 @@ -44,7 +44,8 @@ HTTP GET with split initial request send CURL_SMALLREQSEND=128 -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" diff --git a/tests/data/test1295 b/tests/data/test1295 index de9c86ef21..8de79a310d 100644 --- a/tests/data/test1295 +++ b/tests/data/test1295 @@ -44,7 +44,9 @@ HTTP POST with split initial request send CURL_SMALLREQSEND=100 -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' diff --git a/tests/data/test1404 b/tests/data/test1404 index e40c775b21..7ae7d8b501 100644 --- a/tests/data/test1404 +++ b/tests/data/test1404 @@ -37,7 +37,10 @@ http SSL_CERT_FILE -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 # We create this file before the command is invoked! diff --git a/tests/data/test1583 b/tests/data/test1583 index b266d7eea8..8bcd7811a0 100644 --- a/tests/data/test1583 +++ b/tests/data/test1583 @@ -23,7 +23,8 @@ sftp SFTP dir and empty file ---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 diff --git a/tests/data/test2003 b/tests/data/test2003 index ce5fcbcb6f..f3f2194d42 100644 --- a/tests/data/test2003 +++ b/tests/data/test2003 @@ -58,7 +58,14 @@ tftp HTTP GET, FTP RETR, FILE, TFTP RRQ then again in rev order -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 foo diff --git a/tests/data/test2004 b/tests/data/test2004 index f9770c3fb3..87dabcd6e9 100644 --- a/tests/data/test2004 +++ b/tests/data/test2004 @@ -30,7 +30,14 @@ sftp TFTP RRQ, SFTP, FILE, SCP retrieval then in rev order ---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 This is test data diff --git a/tests/data/test2049 b/tests/data/test2049 index 0fd0d94d77..75ef132011 100644 --- a/tests/data/test2049 +++ b/tests/data/test2049 @@ -31,7 +31,10 @@ Connect to specific host -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 diff --git a/tests/data/test2051 b/tests/data/test2051 index 8523652f02..d730a3c41d 100644 --- a/tests/data/test2051 +++ b/tests/data/test2051 @@ -31,7 +31,9 @@ Connect to specific host: Reuse existing connections if possible -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" diff --git a/tests/data/test2052 b/tests/data/test2052 index 891912dde1..56814d35ab 100644 --- a/tests/data/test2052 +++ b/tests/data/test2052 @@ -32,7 +32,11 @@ http -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" diff --git a/tests/data/test2053 b/tests/data/test2053 index 8322f79e72..7945c0c9b5 100644 --- a/tests/data/test2053 +++ b/tests/data/test2053 @@ -31,7 +31,8 @@ Connect to specific host with IP addresses -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 diff --git a/tests/data/test2054 b/tests/data/test2054 index 350e55634e..7d7d573b4f 100644 --- a/tests/data/test2054 +++ b/tests/data/test2054 @@ -31,7 +31,21 @@ Connect to specific host: use the first "connect-to" string that matches -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 diff --git a/tests/data/test3002 b/tests/data/test3002 index 95d454dee1..ffb6e49a49 100644 --- a/tests/data/test3002 +++ b/tests/data/test3002 @@ -26,7 +26,15 @@ To: another body -smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER --mail-rcpt-allowfails --mail-rcpt invalid.one --mail-rcpt recipient.two@example.com --mail-rcpt recipient.three@example.com --mail-rcpt recipient.four@example.com --mail-rcpt recipient.five@example.com --mail-from sender@example.com -T - +smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER +--mail-rcpt-allowfails +--mail-rcpt invalid.one +--mail-rcpt recipient.two@example.com +--mail-rcpt recipient.three@example.com +--mail-rcpt recipient.four@example.com +--mail-rcpt recipient.five@example.com +--mail-from sender@example.com +-T - diff --git a/tests/data/test3003 b/tests/data/test3003 index 0a90820ad7..07c72f0798 100644 --- a/tests/data/test3003 +++ b/tests/data/test3003 @@ -26,7 +26,15 @@ To: another body -smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER --mail-rcpt-allowfails --mail-rcpt recipient.one@example.com --mail-rcpt recipient.two@example.com --mail-rcpt recipient.three@example.com --mail-rcpt recipient.four@example.com --mail-rcpt invalid.five --mail-from sender@example.com -T - +smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER +--mail-rcpt-allowfails +--mail-rcpt recipient.one@example.com +--mail-rcpt recipient.two@example.com +--mail-rcpt recipient.three@example.com +--mail-rcpt recipient.four@example.com +--mail-rcpt invalid.five +--mail-from sender@example.com +-T - diff --git a/tests/data/test3004 b/tests/data/test3004 index 80261f6703..52ef1188b9 100644 --- a/tests/data/test3004 +++ b/tests/data/test3004 @@ -26,7 +26,15 @@ To: another body -smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER --mail-rcpt-allowfails --mail-rcpt recipient.one@example.com --mail-rcpt recipient.two@example.com --mail-rcpt invalid.three --mail-rcpt recipient.four@example.com --mail-rcpt recipient.five@example.com --mail-from sender@example.com -T - +smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER +--mail-rcpt-allowfails +--mail-rcpt recipient.one@example.com +--mail-rcpt recipient.two@example.com +--mail-rcpt invalid.three +--mail-rcpt recipient.four@example.com +--mail-rcpt recipient.five@example.com +--mail-from sender@example.com +-T - diff --git a/tests/data/test3005 b/tests/data/test3005 index ef417a9cd5..68dedd2fc0 100644 --- a/tests/data/test3005 +++ b/tests/data/test3005 @@ -26,7 +26,15 @@ To: another body -smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER --mail-rcpt-allowfails --mail-rcpt invalid.one --mail-rcpt recipient.two@example.com --mail-rcpt invalid.three --mail-rcpt invalid.four --mail-rcpt invalid.five --mail-from sender@example.com -T - +smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER +--mail-rcpt-allowfails +--mail-rcpt invalid.one +--mail-rcpt recipient.two@example.com +--mail-rcpt invalid.three +--mail-rcpt invalid.four +--mail-rcpt invalid.five +--mail-from sender@example.com +-T - diff --git a/tests/data/test3006 b/tests/data/test3006 index 4cb13ba17d..d5086c23d6 100644 --- a/tests/data/test3006 +++ b/tests/data/test3006 @@ -26,7 +26,15 @@ To: another body -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 sender@example.com -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 sender@example.com +-T - diff --git a/tests/data/test3007 b/tests/data/test3007 index d622240885..3cc0aedc86 100644 --- a/tests/data/test3007 +++ b/tests/data/test3007 @@ -26,7 +26,11 @@ To: another body -smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER --mail-rcpt-allowfails --mail-rcpt invalid.one --mail-from sender@example.com -T - +smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER +--mail-rcpt-allowfails +--mail-rcpt invalid.one +--mail-from sender@example.com +-T - diff --git a/tests/data/test3029 b/tests/data/test3029 index 1436602093..057b2128f8 100644 --- a/tests/data/test3029 +++ b/tests/data/test3029 @@ -23,7 +23,8 @@ http HTTP with multiple -D --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 diff --git a/tests/data/test39 b/tests/data/test39 index 1ca61c8087..02a4659e09 100644 --- a/tests/data/test39 +++ b/tests/data/test39 @@ -29,7 +29,15 @@ http HTTP RFC1867-type formposting with filename= and type= -http://%HOSTIP:%HTTPPORT/we/want/%TESTNUMBER -F name=daniel -F tool=curl --form-string "str1=@literal" --form-string "str2= # We create this file before the command is invoked! diff --git a/tests/data/test4 b/tests/data/test4 index 8b0479c1f8..d96190fa41 100644 --- a/tests/data/test4 +++ b/tests/data/test4 @@ -30,7 +30,17 @@ http Replaced internal and added custom HTTP headers - -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 diff --git a/tests/data/test423 b/tests/data/test423 index 01313a9655..6d6843aa11 100644 --- a/tests/data/test423 +++ b/tests/data/test423 @@ -34,7 +34,11 @@ http -w with url.* variables -"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' diff --git a/tests/data/test424 b/tests/data/test424 index ff35096505..a10752dbbe 100644 --- a/tests/data/test424 +++ b/tests/data/test424 @@ -51,7 +51,12 @@ http -w with urle.* variables -"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 diff --git a/tests/data/test618 b/tests/data/test618 index ee1228f0f3..3e9c980b29 100644 --- a/tests/data/test618 +++ b/tests/data/test618 @@ -15,7 +15,9 @@ sftp SFTP retrieval of two files ---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 Test data diff --git a/tests/data/test619 b/tests/data/test619 index 7862e54767..c929da5673 100644 --- a/tests/data/test619 +++ b/tests/data/test619 @@ -15,7 +15,9 @@ scp SCP retrieval of two files ---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 Test data diff --git a/tests/data/test62 b/tests/data/test62 index d072e34ca8..e1a66537d4 100644 --- a/tests/data/test62 +++ b/tests/data/test62 @@ -29,7 +29,10 @@ http HTTP, send cookies when using custom Host: -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" # Netscape HTTP Cookie File diff --git a/tests/data/test625 b/tests/data/test625 index aaef56e2e5..0aae0b678d 100644 --- a/tests/data/test625 +++ b/tests/data/test625 @@ -22,7 +22,10 @@ sftp SFTP put with --ftp-create-dirs twice ---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 Test data diff --git a/tests/data/test646 b/tests/data/test646 index 2bca8337c6..cc400604db 100644 --- a/tests/data/test646 +++ b/tests/data/test646 @@ -30,7 +30,17 @@ To: another body -smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER --mail-rcpt recipient@example.com --mail-from sender@example.com -F "=(;type=multipart/alternative" -F "= This is the html version;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: " +smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER +--mail-rcpt recipient@example.com +--mail-from sender@example.com +-F "=(;type=multipart/alternative" +-F "= This is the html version;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: " This is an attached file. diff --git a/tests/data/test647 b/tests/data/test647 index 732472db9c..e6edb72c68 100644 --- a/tests/data/test647 +++ b/tests/data/test647 @@ -26,7 +26,18 @@ imap IMAP APPEND multipart using mime API -imap://%HOSTIP:%IMAPPORT/%TESTNUMBER -F "=(;type=multipart/alternative" -F "= This is the html version;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 " -H "To: joe@example.com" -H "Message-Id: " -H "Subject: afternoon meeting" -u user:secret +imap://%HOSTIP:%IMAPPORT/%TESTNUMBER +-F "=(;type=multipart/alternative" +-F "= This is the html version;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 " +-H "To: joe@example.com" +-H "Message-Id: " +-H "Subject: afternoon meeting" +-u user:secret This is an attached file. diff --git a/tests/data/test648 b/tests/data/test648 index 739a61ac21..d36823e88f 100644 --- a/tests/data/test648 +++ b/tests/data/test648 @@ -30,7 +30,13 @@ To: another body -smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER --mail-rcpt recipient@example.com --mail-from sender@example.com -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 recipient@example.com +--mail-from sender@example.com +-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" This is an attached file. diff --git a/tests/data/test917 b/tests/data/test917 index 5f009c7720..3ccc533452 100644 --- a/tests/data/test917 +++ b/tests/data/test917 @@ -26,7 +26,14 @@ To: another body -smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER --mail-rcpt recipient.one@example.com --mail-rcpt recipient.two@example.com --mail-rcpt recipient.three@example.com --mail-rcpt recipient.four@example.com --mail-rcpt recipient.five@example.com --mail-from sender@example.com -T - +smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER +--mail-rcpt recipient.one@example.com +--mail-rcpt recipient.two@example.com +--mail-rcpt recipient.three@example.com +--mail-rcpt recipient.four@example.com +--mail-rcpt recipient.five@example.com +--mail-from sender@example.com +-T - diff --git a/tests/data/test918 b/tests/data/test918 index 491e8be195..d81b44db16 100644 --- a/tests/data/test918 +++ b/tests/data/test918 @@ -26,7 +26,14 @@ To: another body -smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER --mail-rcpt recipient.one@example.com --mail-rcpt invalid --mail-rcpt recipient.three@example.com --mail-rcpt sTrAnGe --mail-rcpt recipient.five@example.com --mail-from sender@example.com -T - +smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER +--mail-rcpt recipient.one@example.com +--mail-rcpt invalid +--mail-rcpt recipient.three@example.com +--mail-rcpt sTrAnGe +--mail-rcpt recipient.five@example.com +--mail-from sender@example.com +-T - diff --git a/tests/data/test938 b/tests/data/test938 index d539b7cb80..a77a3a08e1 100644 --- a/tests/data/test938 +++ b/tests/data/test938 @@ -34,7 +34,8 @@ SMTP multiple connection authentication mail body -smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER001 --mail-rcpt recipient@example.com --mail-from sender@example.com -u user.one:secret -T %LOGDIR/upload%TESTNUMBER -: smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER002 --mail-rcpt recipient@example.com --mail-from sender@example.com -u user.two:secret -T %LOGDIR/upload%TESTNUMBER +smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER001 --mail-rcpt recipient@example.com --mail-from sender@example.com -u user.one:secret -T %LOGDIR/upload%TESTNUMBER -: +smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER002 --mail-rcpt recipient@example.com --mail-from sender@example.com -u user.two:secret -T %LOGDIR/upload%TESTNUMBER diff --git a/tests/runner.pm b/tests/runner.pm index c711834e01..fe43ed05ba 100644 --- a/tests/runner.pm +++ b/tests/runner.pm @@ -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 { -- 2.47.3