From: Dan Fandrich Date: Tue, 13 Aug 2024 08:11:33 +0000 (-0700) Subject: tests: don't mangle output if hostname or type unknown X-Git-Tag: curl-8_10_0~276 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0c4f05c6ee60780365ce7196ab8847f53dc101ce;p=thirdparty%2Fcurl.git tests: don't mangle output if hostname or type unknown If either of these couldn't be determined, the output would be missing a newline. Make sure the line ends even in the case of an error. --- diff --git a/tests/runtests.pl b/tests/runtests.pl index da30957d4e..dccb8463b7 100755 --- a/tests/runtests.pl +++ b/tests/runtests.pl @@ -835,7 +835,9 @@ sub checksystemfeatures { } my $hostname=join(' ', runclientoutput("hostname")); + chomp $hostname; my $hosttype=join(' ', runclientoutput("uname -a")); + chomp $hosttype; my $hostos=$^O; # display summary information about curl and the test host @@ -844,8 +846,8 @@ sub checksystemfeatures { "* $libcurl\n", "* Features: $feat\n", "* Disabled: $dis\n", - "* Host: $hostname", - "* System: $hosttype", + "* Host: $hostname\n", + "* System: $hosttype\n", "* OS: $hostos\n"); if($jobs) {