mirror of
https://github.com/curl/curl.git
synced 2025-01-06 13:44:52 +08:00
runtests: support crlf="yes" for the <stderr> section
This commit is contained in:
parent
fa0b1d9209
commit
a7ec6a76ab
@ -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
|
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.
|
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.
|
This verifies that this data was passed to stderr.
|
||||||
|
|
||||||
Use the mode="text" attribute if the output is in text mode on platforms that
|
Use the mode="text" attribute if the output is in text mode on platforms that
|
||||||
have a text/binary difference.
|
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
|
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
|
before comparing with the one actually received by the client
|
||||||
|
|
||||||
|
@ -1311,6 +1311,10 @@ sub singletest_check {
|
|||||||
chomp($validstderr[-1]);
|
chomp($validstderr[-1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if($hash{'crlf'}) {
|
||||||
|
subnewlines(0, \$_) for @validstderr;
|
||||||
|
}
|
||||||
|
|
||||||
$res = compare($runnerid, $testnum, $testname, "stderr", \@actual, \@validstderr);
|
$res = compare($runnerid, $testnum, $testname, "stderr", \@actual, \@validstderr);
|
||||||
if($res) {
|
if($res) {
|
||||||
return -1;
|
return -1;
|
||||||
|
Loading…
Reference in New Issue
Block a user