1
0
mirror of https://github.com/moparisthebest/curl synced 2024-11-17 15:05:02 -05:00

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

View File

@ -3753,6 +3753,10 @@ sub singletest {
subVariables(\$fileContent); subVariables(\$fileContent);
open(OUTFILE, ">$filename"); open(OUTFILE, ">$filename");
binmode OUTFILE; # for crapage systems, use binary binmode OUTFILE; # for crapage systems, use binary
if($fileattr{'nonewline'}) {
# cut off the final newline
chomp($fileContent);
}
print OUTFILE $fileContent; print OUTFILE $fileContent;
close(OUTFILE); close(OUTFILE);
} }