summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2020-09-13 23:23:44 +0200
committerDaniel Stenberg <daniel@haxx.se>2020-09-13 23:23:44 +0200
commitddc979a0557899ffb579e6fa21d4e84b804dd52b (patch)
tree2c9682d51dce1a10db118d80d10aabaf319479ea
parentf879725c4b33748bd588c65d626f90d4e08e80c7 (diff)
downloadcurl-ddc979a0557899ffb579e6fa21d4e84b804dd52b.tar.gz
runtests: allow creating files without newlines
-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);
}