aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMarc Hoersken <info@marc-hoersken.de>2014-01-26 11:31:52 +0100
committerMarc Hoersken <info@marc-hoersken.de>2014-01-31 20:05:17 +0100
commit9f132f9f39b73170b29bcaa0ea6103d8f6a385ab (patch)
tree06f4ea21b74d20e6d42bd485ed8a4d8d13699cea /tests
parentca9ab24ed5f06c87e1eb8b7530128dac02cad864 (diff)
runtests.pl: added support for text-mode within datacheck section
Diffstat (limited to 'tests')
-rwxr-xr-xtests/runtests.pl13
1 files changed, 8 insertions, 5 deletions
diff --git a/tests/runtests.pl b/tests/runtests.pl
index e63aa0321..65096948d 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;