mirror of
https://github.com/moparisthebest/curl
synced 2024-12-22 08:08:50 -05:00
more nonewline support
This commit is contained in:
parent
3c49b405de
commit
813911db59
@ -19,8 +19,10 @@ data to sent to the client on its request and later verified that it arrived
|
|||||||
safely. Set the nocheck=1 to prevent the test script to verify the arrival
|
safely. Set the nocheck=1 to prevent the test script to verify the arrival
|
||||||
of this data.
|
of this data.
|
||||||
</data>
|
</data>
|
||||||
<datacheck>
|
<datacheck [nonewline=yes]>
|
||||||
if the data is sent but this is what should be checked afterwards
|
if the data is sent but this is what should be checked afterwards. If
|
||||||
|
'nonewline' is set, we will cut off the trailing newline of this given data
|
||||||
|
before comparing with the one actually received by the client
|
||||||
</datacheck>
|
</datacheck>
|
||||||
<size>
|
<size>
|
||||||
number to return on a ftp SIZE command
|
number to return on a ftp SIZE command
|
||||||
|
@ -471,6 +471,14 @@ sub singletest {
|
|||||||
|
|
||||||
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($hash{'nonewline'}) {
|
||||||
|
# Yes, we must cut off the final newline from the final line
|
||||||
|
# of the datacheck
|
||||||
|
chomp($replycheck[$#replycheck]);
|
||||||
|
}
|
||||||
|
|
||||||
@reply=@replycheck;
|
@reply=@replycheck;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user