autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: autotest/AT_CHECK: ways to pass additional options on to diff?


From: Nick Bowler
Subject: Re: autotest/AT_CHECK: ways to pass additional options on to diff?
Date: Thu, 25 Apr 2019 17:10:11 -0400

On 2019-04-25, Jannick <address@hidden> wrote:
> But there is an elegant solution to that, whereas in the beginning I was
> too 'narrow-minded' because of the host of information about the autoconf
> machinery I had to process and to cope with: simply offer autotest a
> customized script called 'diff' - surprise surprise - the testsuite script
> finds **first** on PATH.  This solution does not change any package, but
> rather the environment autoconf finds itself in.  This is easily
> established on the command line.

Yes, that sounds workable.  You can fairly easily generate such a wrapper
script in configure, too, if for portability you need to test whether diff
supports some particular option.

I would have one concern about using diff --strip-trailing-cr in test cases
however: if the program fails to produce the expected DOS line endings, the
diff will not notice this.

Assuming the Windows version of a program is intended to produce such line
endings, these test cases won't be able to tell if the program accidentally
produces Unix line endings instead (which might plausibly happen on Windows
if a C program opens a file in binary mode when text mode was required).

This may or may not be a problem for you.

Cheers,
  Nick



reply via email to

[Prev in Thread] Current Thread [Next in Thread]