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
This commit is contained in:
Viktor Szakats 2025-11-12 17:26:27 +01:00
parent 64c03bbdf2
commit 3d42510118
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201
38 changed files with 233 additions and 39 deletions

View file

@ -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