From: Ian Jackson Date: Sun, 15 Jan 2017 22:19:55 +0000 (+0000) Subject: test suite: gitattributes: test unsetup tree, too X-Git-Tag: archive/debian/3.3~8 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=dgit.git;a=commitdiff_plain;h=0d69052a5295535c85d05879cc8bf530d0e906e7 test suite: gitattributes: test unsetup tree, too Signed-off-by: Ian Jackson --- diff --git a/tests/tests/gitattributes b/tests/tests/gitattributes index c8d1b0ae..74dbddef 100755 --- a/tests/tests/gitattributes +++ b/tests/tests/gitattributes @@ -100,6 +100,21 @@ sfmt_import () { mkdir $pdb-import-$inst cd $pdb-import-$inst git init + + t-dgit $dgitargs import-dsc ../${p}_${v}.dsc +$refname.broken + git checkout $refname.broken + sha256sum af/* >../$sums.broken + + for s in ../sums ../$sums.broken; do + sed 's/[0-9a-f]* //' $s >$s.nosums + done + diff -U0 ../sums.nosums ../$sums.broken.nosums + set +e + diff -U0 ../sums ../$sums.broken + rc=$? + set -e + test $rc = 1 + t-dgit setup-new-tree t-dgit $dgitargs import-dsc ../${p}_${v}.dsc +$refname @@ -108,9 +123,10 @@ sfmt_import () { sums=sums.$sfmt-$inst for f in af/*; do - git cat-file blob "refs/heads/$refname:$f" | sha256sum | \ - sed -e 's#-$#'$f'#' \ - >>../$sums + git cat-file blob "refs/heads/$refname:$f" \ + | sha256sum \ + | sed -e 's#-$#'$f'#' \ + >>../$sums done cd ..