cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: [PATCH] Allow various Curl test suite tests to work on non-ASCII platforms

From: David McCreedy <mccreedytpf_at_gmail.com>
Date: Thu, 7 May 2009 23:29:09 -0600

On Thu, May 7, 2009 at 10:02 AM, Yang Tse <yangsita_at_gmail.com> wrote:

>
> Regarding the unconditional removal of the potential trailing CR using
> the <strip> or <strippart> section for test case definitions #508 and
> #555 I think this is not the way to go. We would weaken those tests
> cases for systems which don't use CURL_DOES_CONVERSIONS.
>
> Taking in consideration that you will most probably need to adjust
> other, existing or feature, test cases I think you should consider
> slightly expanding the test definition file format.
>
> You could first try to use definitions for tests 508 and 555 using
> <protocol nonewline="yes">
>
> If the above works for you, the next step would be to modify
> runtests.pl to allow handling something like <protocol
> nonewline="yes-when-curl-does-conversions">. Otherwise handling of
> <protocol nocarriagereturn="yes-when-curl-does-conversions"> will be
> needed. And documenting the new functionality in tests/FILEFORMAT.
>
> --
> -=[Yang]=-
>

I've just tried this out and, unfortunately, test 555 has two lines where
the CRLF needs to become a LF.
Specifically, "this is the blurb we want to uploadCRLF".
Using the proposed modified nonewline option I can change the final "this is
the blurb we want to uploadCRLF" to "this is the blurb we want to uploadLF"
but not the first one, so the test still fails.

How about a new <strippartconv> (or some similar name) that only applies for
systems that use CURL_DOES_CONVERSIONS?
I've tried this out and it works.
It would be ignored on systems that don't use CURL_DOES_CONVERSIONS.
And it's more flexible than a newline-specific approach.

If this is acceptable I can work up a patch.

Thanks,

-David
Received on 2009-05-08