]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
runtests.pl: support attribute "nonewline" in part verify/upload.
authorPatrick Monnerat <patrick@monnerat.net>
Tue, 5 Sep 2017 16:10:05 +0000 (17:10 +0100)
committerPatrick Monnerat <patrick@monnerat.net>
Tue, 5 Sep 2017 16:33:16 +0000 (17:33 +0100)
tests/runtests.pl

index 7d260afcf7855383a7d63331058b6c07a7eca88b..e3cf2bff8f19265d612040c5f38476816bc1b0ad 100755 (executable)
@@ -3755,6 +3755,13 @@ sub singletest {
 
     # if this section exists, we verify upload
     my @upload = getpart("verify", "upload");
+    if(@upload) {
+      my %hash = getpartattr("verify", "upload");
+      if($hash{'nonewline'}) {
+          # cut off the final newline from the final line of the upload data
+          chomp($upload[$#upload]);
+      }
+    }
 
     # if this section exists, it might be FTP server instructions:
     my @ftpservercmd = getpart("reply", "servercmd");