From 813911db595d5a4ae8d0f870d2bb84058f696b6b Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 11 Jun 2002 15:11:41 +0000 Subject: [PATCH] more nonewline support --- tests/FILEFORMAT | 6 ++++-- tests/runtests.pl | 8 ++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/tests/FILEFORMAT b/tests/FILEFORMAT index 6eb143485..c64423ef4 100644 --- a/tests/FILEFORMAT +++ b/tests/FILEFORMAT @@ -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 of this data. - -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 number to return on a ftp SIZE command diff --git a/tests/runtests.pl b/tests/runtests.pl index a9b6e6ff3..c7c95a222 100755 --- a/tests/runtests.pl +++ b/tests/runtests.pl @@ -471,6 +471,14 @@ sub singletest { if (@replycheck) { # 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; }