runtests: allow creating files without newlines

Closes #5946
This commit is contained in:
Daniel Stenberg 2020-09-13 23:23:44 +02:00
parent 47dd957daf
commit b83947c8df
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2
1 changed files with 4 additions and 0 deletions

View File

@ -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);
}