diff options
author | Daniel Stenberg <daniel@haxx.se> | 2022-12-27 11:50:23 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2022-12-27 15:22:32 +0100 |
commit | dc0725244a3163f1e2d5f51165db3a1a430f3ba0 (patch) | |
tree | 8f36eaa16ec50f1d43b46387a5c3fe23682f05bc | |
parent | ca02a77f05bd5cef20618c8f741aa48b7be0a648 (diff) | |
download | curl-dc0725244a3163f1e2d5f51165db3a1a430f3ba0.tar.gz |
runtests: support crlf="yes" for verify/proxy
-rw-r--r-- | tests/FILEFORMAT.md | 4 | ||||
-rwxr-xr-x | tests/runtests.pl | 5 |
2 files changed, 7 insertions, 2 deletions
diff --git a/tests/FILEFORMAT.md b/tests/FILEFORMAT.md index 8143967db..be111678e 100644 --- a/tests/FILEFORMAT.md +++ b/tests/FILEFORMAT.md @@ -566,7 +566,7 @@ changing protocol data such as port numbers or user-agent strings. One perl op per line that operates on the protocol dump. This is pretty advanced. Example: `s/^EPRT .*/EPRT stripped/`. -### `<protocol [nonewline="yes"] crlf="yes">` +### `<protocol [nonewline="yes"][crlf="yes"]>` the protocol dump curl should transmit, if `nonewline` is set, we will cut off the trailing newline of this given data before comparing with the one actually @@ -576,7 +576,7 @@ comparisons are made. `crlf=yes` forces the newlines to become CRLF even if not written so in the test. -### `<proxy [nonewline="yes"]>` +### `<proxy [nonewline="yes"][crlf="yes"]>` The protocol dump curl should transmit to an HTTP proxy (when the http-proxy server is used), if `nonewline` is set, we will cut off the trailing newline diff --git a/tests/runtests.pl b/tests/runtests.pl index 274911f47..33caf7c5c 100755 --- a/tests/runtests.pl +++ b/tests/runtests.pl @@ -4750,6 +4750,11 @@ sub singletest { } } + if($hash{'crlf'} || + ($has_hyper && ($keywords{"HTTP"} || $keywords{"HTTPS"}))) { + map subNewlines(0, \$_), @protstrip; + } + $res = compare($testnum, $testname, "proxy", \@out, \@protstrip); if($res) { return $errorreturncode; |