runtests: support crlf="yes" for the <stderr> section

This commit is contained in:
Daniel Stenberg 2024-06-23 16:22:40 +02:00
parent fa0b1d9209
commit a7ec6a76ab
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2
2 changed files with 8 additions and 1 deletions

View File

@ -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 `<strip>` and `<strippart>` rules are applied before comparisons are made.
### `<stderr [mode="text"] [nonewline="yes"]>`
### `<stderr [mode="text"] [nonewline="yes"] [crlf="yes"]>`
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

View File

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