curl-library
[PATCH 3/4] runtests.pl: added support for text-mode within datacheck section
From: Marc Hoersken <info_at_marc-hoersken.de>
Date: Sun, 26 Jan 2014 11:31:52 +0100
Date: Sun, 26 Jan 2014 11:31:52 +0100
--- tests/runtests.pl | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/tests/runtests.pl b/tests/runtests.pl index e63aa03..6509694 100755 --- a/tests/runtests.pl +++ b/tests/runtests.pl @@ -3147,15 +3147,20 @@ sub singletest { my @reply = getpart("reply", "data"); my @replycheck = getpart("reply", "datacheck"); + my %replyattr = getpartattr("reply", "data"); + my %replycheckattr = getpartattr("reply", "datacheck"); + if (@replycheck) { # we use this file instead to check the final output against - my %hash = getpartattr("reply", "datacheck"); - if($hash{'nonewline'}) { + if($replycheckattr{'nonewline'}) { # Yes, we must cut off the final newline from the final line # of the datacheck chomp($replycheck[$#replycheck]); } + if($replycheckattr{'mode'}) { + $replyattr{'mode'} = $replycheckattr{'mode'}; + } @reply=@replycheck; } @@ -3636,13 +3641,11 @@ sub singletest { $ok .= "-"; # stdout not checked } - my %replyattr = getpartattr("reply", "data"); if(!$replyattr{'nocheck'} && (@reply || $replyattr{'sendzero'})) { # verify the received data my @out = loadarray($CURLOUT); - my %hash = getpartattr("reply", "data"); # get the mode attribute - my $filemode=$hash{'mode'}; + my $filemode=$replyattr{'mode'}; if($filemode && ($filemode eq "text") && $has_textaware) { # text mode when running on windows: fix line endings map s/\r\n/\n/g, @reply; -- 1.8.1.msysgit.1 --------------010500040702000407000504 Content-Type: text/plain; charset=windows-1252; name="0004-FTP-tests-enable-text-mode-for-data-and-datacheck-se.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename*0="0004-FTP-tests-enable-text-mode-for-data-and-datacheck-se.pa"; filename*1="tch"Received on 2001-09-17