summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2020-09-13 23:23:44 +0200
committerDaniel Stenberg <daniel@haxx.se>2020-09-14 08:32:45 +0200
commitb83947c8df7a2d427316e5c17839da58541424bc (patch)
treed88cb4839fdeb6e9a0af844b2375a9058f9444d9 /tests
parent47dd957daff9199daa5fabfc557fe8c36d61f375 (diff)
downloadcurl-b83947c8df7a2d427316e5c17839da58541424bc.tar.gz
runtests: allow creating files without newlines
Closes #5946
Diffstat (limited to 'tests')
-rwxr-xr-xtests/runtests.pl4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/runtests.pl b/tests/runtests.pl
index 3985f7fde..7bfaab57a 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);
}