From: Daniel Stenberg Date: Sun, 23 Jun 2024 14:22:40 +0000 (+0200) Subject: runtests: support crlf="yes" for the section X-Git-Tag: curl-8_9_0~207 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a7ec6a76abf5e29fb3f951a09d429ce5fbff250f;p=thirdparty%2Fcurl.git runtests: support crlf="yes" for the section --- diff --git a/tests/FILEFORMAT.md b/tests/FILEFORMAT.md index d4dd85b5ef..928b5567b2 100644 --- a/tests/FILEFORMAT.md +++ b/tests/FILEFORMAT.md @@ -627,12 +627,15 @@ server is used), if `nonewline` is set, we will cut off the trailing newline of this given data before comparing with the one actually sent by the client The `` and `` rules are applied before comparisons are made. -### `` +### `` This verifies that this data was passed to stderr. Use the mode="text" attribute if the output is in text mode on platforms that have a text/binary difference. +`crlf=yes` forces the newlines to become CRLF even if not written so in the +test. + If `nonewline` is set, we will cut off the trailing newline of this given data before comparing with the one actually received by the client diff --git a/tests/runtests.pl b/tests/runtests.pl index 8839b1b3eb..03358da001 100755 --- a/tests/runtests.pl +++ b/tests/runtests.pl @@ -1311,6 +1311,10 @@ sub singletest_check { chomp($validstderr[-1]); } + if($hash{'crlf'}) { + subnewlines(0, \$_) for @validstderr; + } + $res = compare($runnerid, $testnum, $testname, "stderr", \@actual, \@validstderr); if($res) { return -1;