summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtests/tests/gitattributes22
1 files changed, 15 insertions, 7 deletions
diff --git a/tests/tests/gitattributes b/tests/tests/gitattributes
index fd3faa3..a00c1d3 100755
--- a/tests/tests/gitattributes
+++ b/tests/tests/gitattributes
@@ -103,6 +103,20 @@ sfmt_setup () {
cd ..
}
+sums_check () {
+ # caller should cd into working directory and set
+ # $sums $branch
+
+ for f in af/*; do
+ git cat-file blob "refs/heads/$branch:$f" \
+ | sha256sum \
+ | sed -e 's#-$#'$f'#' \
+ >>../$sums
+ done
+
+ diff -U0 ../sums ../$sums
+}
+
sfmt_import () {
inst=$1
dgitargs=$2
@@ -137,15 +151,9 @@ sfmt_import () {
t-dgit $dgitargs import-dsc ../$dscf +$branch
git checkout $branch
- for f in af/*; do
- git cat-file blob "refs/heads/$branch:$f" \
- | sha256sum \
- | sed -e 's#-$#'$f'#' \
- >>../$sums
- done
+ sums_check
cd ..
- diff -U0 sums $sums
}
: ----- generate the orig -----