fixup the stderr warn mode

This commit is contained in:
Daniel Stenberg 2026-02-22 12:27:40 +01:00
parent 7ffa1b41d7
commit 69bb702d39
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
2 changed files with 15 additions and 7 deletions

View file

@ -55,7 +55,7 @@ Content-Type: application/x-www-form-urlencoded
</protocol>
<stderr mode="warn">
Warning: %LOGDIR/config:1 Option 'data' uses argument with leading single quote.%SP
Warning: It is probably a mistake. Consider double quotes.
It is probably a mistake. Consider double quotes.
</stderr>
</verify>
</testcase>

View file

@ -1347,12 +1347,20 @@ sub singletest_check {
normalize_text(\@actual);
}
if($filemode && ($filemode eq "warn")) {
map { 's/Warning: //' } (@validstderr);
map { 's/\r//' } (@validstderr);
map { 's/\n/ /' } (@validstderr);
map { 's/Warning: //' } (@actual);
map { 's/\r//' } (@actual);
map { 's/\n/ /' } (@actual);
for(@validstderr) {
s/Warning: //;
s/\r//;
s/\n/ /;
}
for(@actual) {
s/Warning: //;
s/\r//;
s/\n/ /;
}
my $v = join(@validstderr, "");
my $a = join(@actual, "");
@validstderr = $v;
@actual = $a;
}
if($hash{'nonewline'}) {