From: Daniel Stenberg Date: Sun, 13 Sep 2020 21:23:44 +0000 (+0200) Subject: runtests: allow creating files without newlines X-Git-Tag: curl-7_73_0~111 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b83947c8df7;p=thirdparty%2Fcurl.git runtests: allow creating files without newlines Closes #5946 --- diff --git a/tests/runtests.pl b/tests/runtests.pl index 3985f7fde3..7bfaab57a9 100755 --- a/tests/runtests.pl +++ b/tests/runtests.pl @@ -3753,6 +3753,10 @@ sub singletest { subVariables(\$fileContent); open(OUTFILE, ">$filename"); binmode OUTFILE; # for crapage systems, use binary + if($fileattr{'nonewline'}) { + # cut off the final newline + chomp($fileContent); + } print OUTFILE $fileContent; close(OUTFILE); }