summaryrefslogtreecommitdiff
path: root/tests/tests/gitattributes
diff options
context:
space:
mode:
Diffstat (limited to 'tests/tests/gitattributes')
-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 ..