From: Rob Browning Date: Thu, 31 Oct 2013 15:23:24 +0000 (-0500) Subject: test-cat-file.sh: use -l instead of -b; explain differences. X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=5fdb455a2af008b5b504bbce98ad007c95c7e822;p=packages%2Fb%2Fbup.git test-cat-file.sh: use -l instead of -b; explain differences. It turns out that cmp -b doesn't work on at least NetBSD, so use -l instead, and when there's a problem, diff the "bup meta" output as well. Thanks to Thomas Klausner for the report. Signed-off-by: Rob Browning --- diff --git a/t/test-cat-file.sh b/t/test-cat-file.sh index 58a9da3..f0d7ebe 100755 --- a/t/test-cat-file.sh +++ b/t/test-cat-file.sh @@ -35,6 +35,10 @@ bupm_hash=$(WVPASS git ls-tree "$src_hash" | grep -F .bupm | cut -d' ' -f 3) \ || exit $? bupm_hash=$(WVPASS echo "$bupm_hash" | cut -d' ' -f 1) || exit $? WVPASS git cat-file blob "$bupm_hash" > git-cat-bupm -WVPASS cmp -b git-cat-bupm bup-cat-bupm +if ! cmp git-cat-bupm bup-cat-bupm; then + cmp -l git-cat-bupm bup-cat-bupm + diff -uN <(bup meta -tvvf git-cat-bupm) <(bup meta -tvvf bup-cat-bupm) + WVPASS cmp git-cat-bupm bup-cat-bupm +fi WVPASS rm -rf "$tmpdir"