]> arthur.barton.de Git - bup.git/blobdiff - t/test-cat-file.sh
get: adjust for python 3 and test there
[bup.git] / t / test-cat-file.sh
index f0d7ebe30e4fce64a31d9201174ef5416e750256..ec8610c905f00c5e589f27b9475bc1f0138cfcad 100755 (executable)
@@ -1,5 +1,7 @@
 #!/usr/bin/env bash
-. ./wvtest-bup.sh
+. ./wvtest-bup.sh || exit $?
+
+set -o pipefail
 
 top="$(WVPASS pwd)" || exit $?
 tmpdir="$(WVPASS wvmktempdir)" || exit $?
@@ -34,7 +36,7 @@ src_hash=$(WVPASS bup ls -s "src/latest/$(pwd)" | cut -d' ' -f 1) || exit $?
 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 "$top/t/git-cat-tree" "$bupm_hash" > git-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)