]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
tests: don't mangle output if hostname or type unknown
authorDan Fandrich <dan@coneharvesters.com>
Tue, 13 Aug 2024 08:11:33 +0000 (01:11 -0700)
committerDan Fandrich <dan@coneharvesters.com>
Tue, 13 Aug 2024 08:13:00 +0000 (01:13 -0700)
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.

tests/runtests.pl

index da30957d4edc14b3bb8223653ad0b54957eea73d..dccb8463b71615d0adfa712f5591ae9d92f5a8f4 100755 (executable)
@@ -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) {