runtests.pl: added support for text-mode within datacheck section
This commit is contained in:
parent
ca9ab24ed5
commit
9f132f9f39
@ -3147,15 +3147,20 @@ sub singletest {
|
|||||||
my @reply = getpart("reply", "data");
|
my @reply = getpart("reply", "data");
|
||||||
my @replycheck = getpart("reply", "datacheck");
|
my @replycheck = getpart("reply", "datacheck");
|
||||||
|
|
||||||
|
my %replyattr = getpartattr("reply", "data");
|
||||||
|
my %replycheckattr = getpartattr("reply", "datacheck");
|
||||||
|
|
||||||
if (@replycheck) {
|
if (@replycheck) {
|
||||||
# we use this file instead to check the final output against
|
# we use this file instead to check the final output against
|
||||||
|
|
||||||
my %hash = getpartattr("reply", "datacheck");
|
if($replycheckattr{'nonewline'}) {
|
||||||
if($hash{'nonewline'}) {
|
|
||||||
# Yes, we must cut off the final newline from the final line
|
# Yes, we must cut off the final newline from the final line
|
||||||
# of the datacheck
|
# of the datacheck
|
||||||
chomp($replycheck[$#replycheck]);
|
chomp($replycheck[$#replycheck]);
|
||||||
}
|
}
|
||||||
|
if($replycheckattr{'mode'}) {
|
||||||
|
$replyattr{'mode'} = $replycheckattr{'mode'};
|
||||||
|
}
|
||||||
|
|
||||||
@reply=@replycheck;
|
@reply=@replycheck;
|
||||||
}
|
}
|
||||||
@ -3636,13 +3641,11 @@ sub singletest {
|
|||||||
$ok .= "-"; # stdout not checked
|
$ok .= "-"; # stdout not checked
|
||||||
}
|
}
|
||||||
|
|
||||||
my %replyattr = getpartattr("reply", "data");
|
|
||||||
if(!$replyattr{'nocheck'} && (@reply || $replyattr{'sendzero'})) {
|
if(!$replyattr{'nocheck'} && (@reply || $replyattr{'sendzero'})) {
|
||||||
# verify the received data
|
# verify the received data
|
||||||
my @out = loadarray($CURLOUT);
|
my @out = loadarray($CURLOUT);
|
||||||
my %hash = getpartattr("reply", "data");
|
|
||||||
# get the mode attribute
|
# get the mode attribute
|
||||||
my $filemode=$hash{'mode'};
|
my $filemode=$replyattr{'mode'};
|
||||||
if($filemode && ($filemode eq "text") && $has_textaware) {
|
if($filemode && ($filemode eq "text") && $has_textaware) {
|
||||||
# text mode when running on windows: fix line endings
|
# text mode when running on windows: fix line endings
|
||||||
map s/\r\n/\n/g, @reply;
|
map s/\r\n/\n/g, @reply;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user