From: Daniel Stenberg Date: Fri, 4 Jan 2008 23:31:04 +0000 (+0000) Subject: Daniel Egger provided 'nonewline=yes' support for the section X-Git-Tag: upstream/7.37.1~8258 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fe0d7aee499df8a49e6249ac4dd9dc900b5a0a32;p=platform%2Fupstream%2Fcurl.git Daniel Egger provided 'nonewline=yes' support for the section --- diff --git a/tests/FILEFORMAT b/tests/FILEFORMAT index 550bcb6..b29084b 100644 --- a/tests/FILEFORMAT +++ b/tests/FILEFORMAT @@ -275,11 +275,14 @@ off the trailing newline of this given data before comparing with the one actually sent by the client Variables are substituted as in the section. - + This verifies that this data was passed to stdout. Use the mode="text" attribute if the output is in text mode on platforms that have a text/binary difference. + +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 The file's contents must be identical to this after the test is complete. diff --git a/tests/runtests.pl b/tests/runtests.pl index 231d756..6a5f4a0 100755 --- a/tests/runtests.pl +++ b/tests/runtests.pl @@ -2042,6 +2042,12 @@ sub singletest { map s/\r\n/\n/g, @actual; } + if($hash{'nonewline'}) { + # Yes, we must cut off the final newline from the final line + # of the protocol data + chomp($validstdout[$#validstdout]); + } + $res = compare("stdout", \@actual, \@validstdout); if($res) { return 1;