mirror of
https://github.com/curl/curl.git
synced 2026-08-01 12:58:07 +03:00
tests: use \r\n for log messages in WSL
Bash in Windows Subsystem for Linux (WSL) requires it for some reason. (This is one of several commits to support use of WSL for the tests.) Ref: https://github.com/curl/curl/pull/3899
This commit is contained in:
parent
476a832094
commit
0783f2e585
1 changed files with 9 additions and 1 deletions
|
|
@ -206,6 +206,9 @@ my $valgrind_tool;
|
|||
my $gdb = checktestcmd("gdb");
|
||||
my $httptlssrv = find_httptlssrv();
|
||||
|
||||
my $uname_release = `uname -r`;
|
||||
my $is_wsl = $uname_release =~ /Microsoft$/;
|
||||
|
||||
my $has_ssl; # set if libcurl is built with SSL support
|
||||
my $has_largefile; # set if libcurl is built with large file support
|
||||
my $has_idn; # set if libcurl is built with IDN support
|
||||
|
|
@ -324,7 +327,12 @@ my $tortalloc;
|
|||
#
|
||||
sub logmsg {
|
||||
for(@_) {
|
||||
print "$_";
|
||||
my $line = $_;
|
||||
if ($is_wsl) {
|
||||
# use \r\n for WSL shell
|
||||
$line =~ s/\r?\n$/\r\n/g;
|
||||
}
|
||||
print "$line";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue