Jim Meyering wrote:
> Since that systems lacks
> a version of diff, we get far-less-useful cmp output
That system (OpenBSD 4.9) has a version of diff that understands
the options -c and -u:
$ type diff
diff is /usr/bin/diff
$ diff -help
usage: diff [-abdilpTtw] [-c | -e | -f | -n | -q | -u] [-I pattern] [-L label]
file1 file2
diff [-abdilpTtw] [-I pattern] [-L label] -C number file1 file2
diff [-abdiltw] [-I pattern] -D string file1 file2
diff [-abdilpTtw] [-I pattern] [-L label] -U number file1 file2
diff [-abdilNPprsTtw] [-c | -e | -f | -n | -q | -u] [-I pattern]
[-L label] [-S name] [-X file] [-x pattern] dir1 dir2
It looks like your check in tests/init.sh is too pessimistic:
if ( diff --version < /dev/null 2>&1 | grep GNU ) > /dev/null 2>&1; then
compare () { diff -u "$@"; }
Change that to
if ( diff -u "$0" "$0" < /dev/null ) > /dev/null 2>&1; then
compare () { diff -u "$@"; }
and you should receive better output.
> maybe run the tests with a better shell in your path?
I have bash in my $PATH. I don't know what you mean by "run the tests
with a better shell"; I'm only running "./configure; make; make check".
If you want the generated .log files and tests/test-suite.log to
contain more informative output, you have to change the test framework
or the Makefile.am so that it uses the 'bash' that it can find in my
$PATH.
Or are you referring to some environment variable SHELL_FOR_TESTS that
I should set (and that I don't know about)?
Bruno
--
In memoriam Nikolai Bryukhanov <http://en.wikipedia.org/wiki/Nikolai_Bryukhanov>