summaryrefslogtreecommitdiff
path: root/tests/tests
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2017-01-15 22:19:55 +0000
committerIan Jackson <ijackson@chiark.greenend.org.uk>2017-01-16 01:25:02 +0000
commit0d69052a5295535c85d05879cc8bf530d0e906e7 (patch)
tree37e49ea696709d23f5afc8bf606158df935baf7c /tests/tests
parent24f513d989f503cc52eca756d15d47eaa2672918 (diff)
test suite: gitattributes: test unsetup tree, too
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Diffstat (limited to 'tests/tests')
-rwxr-xr-xtests/tests/gitattributes22
1 files changed, 19 insertions, 3 deletions
diff --git a/tests/tests/gitattributes b/tests/tests/gitattributes
index c8d1b0a..74dbdde 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 ..