chiark / gitweb /
test suite: gitattributes: Break out dscf= setting
[dgit.git] / tests / tests / gitattributes
index 7b0818a0cf9177d5cc6f9fbe063b2372d272d102..a0e436d24a4c13bf830a47e773394de2fb0d5ff7 100755 (executable)
@@ -3,6 +3,7 @@ set -e
 . tests/lib
 
 t-dependencies bsdgames
+t-dependencies man-db git-man
 t-tstunt-parsechangelog
 
 t-archive-none example
@@ -56,6 +57,15 @@ badattr export-subst
 badattr delta
 badattr encoding no-such-encoding
 
+man gitattributes \
+| perl -ne 'print $1,"\n" if m/^ *(\w[-a-z]*)$/' \
+> grepped-attrs
+
+exec <grepped-attrs
+while read attr; do
+       badattr $attr
+done
+
 sha256sum af/* >sums
 
 # ----- common to source formats -----
@@ -96,12 +106,17 @@ sfmt_import () {
        inst=$1
        dgitargs=$2
        refname="import.$sfmt-$inst"
+       brkerr=stderr.$sfmt-$inst.broken
+       dscf=${p}_${v}.dsc
 
        mkdir $pdb-import-$inst
        cd $pdb-import-$inst
        git init
 
-       t-dgit $dgitargs import-dsc ../${p}_${v}.dsc +$refname.broken
+       LC_MESSAGES=C \
+       t-dgit $dgitargs import-dsc ../$dscf +$refname.broken \
+               2>&1 |tee ../$brkerr
+       fgrep 'warning: source tree contains .gitattributes' ../$brkerr
        git checkout $refname.broken
        sha256sum af/* >../$sums.broken
 
@@ -117,7 +132,7 @@ sfmt_import () {
 
        t-dgit setup-new-tree
 
-       t-dgit $dgitargs import-dsc ../${p}_${v}.dsc +$refname
+       t-dgit $dgitargs import-dsc ../$dscf +$refname
        git checkout $refname
 
        sums=sums.$sfmt-$inst