From a7ec6a76abf5e29fb3f951a09d429ce5fbff250f Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sun, 23 Jun 2024 16:22:40 +0200 Subject: [PATCH] runtests: support crlf="yes" for the section --- tests/FILEFORMAT.md | 5 ++++- tests/runtests.pl | 4 ++++ 2 files changed, 8 insertions(+), 1 deletion(-) 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; -- 2.47.3