On 2011-07-26 Jonathan Nieder wrote:
> xzdiff was clobbering the exit status from diff in a case statement
> used to analyze the exit statuses from "xz" when its operands were
> two compressed files.  Save and restore diff's exit status to fix
> this.

The fix looks OK. The test suite addition needs minor changes.

> +temporaries="tmp_preimage.xz tmp_samepostimage.xz
> tmp_otherpostimage.xz"
> +rm -f $temporaries
> +trap "rm -f $temporaries" 0

I'm not sure how well "trap" behaves with ancient shells. You can use
the included test files instead of temp files:

    "$srcdir/files/good-1-check-crc32.xz"
    "$srcdir/files/good-1-check-crc64.xz"
    "$srcdir/files/good-1-lzma2-1.xz"

> +PATH=$(pwd)/../src/xz:$PATH

Ancient pre-POSIX /bin/sh implementations don't support $(pwd) so
it's better to use `pwd` here. The same shells need a separate "export
PATH" to update the environment.

-- 
Lasse Collin  |  IRC: Larhzu @ IRCnet & Freenode

Reply via email to