3 ###############################################################################
5 # Author: Jonathan Nieder
7 # This file has been put into the public domain.
8 # You can do whatever you want with this file.
10 ###############################################################################
12 # If scripts weren't built, this test is skipped.
14 XZDIFF
=..
/src
/scripts
/xzdiff
16 test -x "$XZDIFF" || XZDIFF
=
17 if test -z "$XZ" ||
test -z "$XZDIFF"; then
22 PATH
=`pwd`/..
/src
/xz
:$PATH
25 preimage
=$srcdir/files
/good-1-check-crc32.xz
26 samepostimage
=$srcdir/files
/good-1-check-crc64.xz
27 otherpostimage
=$srcdir/files
/good-1-lzma2-1.xz
29 "$XZDIFF" "$preimage" "$samepostimage" >/dev
/null
31 if test "$status" != 0 ; then
32 echo "xzdiff with no changes exited with status $status != 0"
37 "$XZDIFF" "$preimage" "$otherpostimage" >/dev
/null
39 if test "$status" != 1 ; then
40 echo "xzdiff with changes exited with status $status != 1"
45 "$XZDIFF" "$preimage" "$srcdir/files/missing.xz" >/dev
/null
2>&1
47 if test "$status" != 2 ; then
48 echo "xzdiff with missing operand exited with status $status != 2"