mirror of
https://github.com/curl/curl.git
synced 2026-08-09 16:24:18 +03:00
tool_getparam: add support for --longopt=value
If the long option name ends with an equals sign (`=`), the argument is the text following on its right side. This makes the command line parser accept this common style in addition to the existing way to accept option arguments more similar to how other command line tools do. Example: `curl --user-agent=curl-2000 https://example.com/` Change a few existing tests to use this syntax: 206, 1333, 1335, 1442 Closes #17789
This commit is contained in:
parent
378713deb2
commit
9f9fecc724
6 changed files with 29 additions and 6 deletions
|
|
@ -31,7 +31,7 @@ http
|
|||
HTTP POST zero length, chunked-encoded
|
||||
</name>
|
||||
<command>
|
||||
-d "" --header "Transfer-Encoding: chunked" http://%HOSTIP:%HTTPPORT/%TESTNUMBER
|
||||
-d "" --header="Transfer-Encoding: chunked" http://%HOSTIP:%HTTPPORT/%TESTNUMBER
|
||||
</command>
|
||||
</client>
|
||||
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ http
|
|||
HTTP GET with -O without Content-Disposition, -D stdout
|
||||
</name>
|
||||
<command option="no-output,no-include">
|
||||
http://%HOSTIP:%HTTPPORT/%TESTNUMBER -O -D - --output-dir %LOGDIR
|
||||
http://%HOSTIP:%HTTPPORT/%TESTNUMBER -O -D - --output-dir="%LOGDIR"
|
||||
</command>
|
||||
</client>
|
||||
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ file
|
|||
Check --write-out with trailing \
|
||||
</name>
|
||||
<command>
|
||||
file://localhost/%FILE_PWD/%LOGDIR/non-existent-file.txt --write-out '\'
|
||||
file://localhost/%FILE_PWD/%LOGDIR/non-existent-file.txt --write-out='\'
|
||||
</command>
|
||||
</client>
|
||||
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ digest
|
|||
HTTP proxy CONNECT auth Digest
|
||||
</name>
|
||||
<command>
|
||||
http://test.remote.haxx.se.%TESTNUMBER:8990/path/%TESTNUMBER0002 --proxy http://%HOSTIP:%HTTPPORT --proxy-user silly:person --proxy-digest --proxytunnel
|
||||
http://test.remote.haxx.se.%TESTNUMBER:8990/path/%TESTNUMBER0002 --proxy=http://%HOSTIP:%HTTPPORT --proxy-user=silly:person --proxy-digest --proxytunnel
|
||||
</command>
|
||||
</client>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue