diff options
author | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2018-06-20 14:28:00 +0100 |
---|---|---|
committer | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2018-06-20 14:29:38 +0100 |
commit | 47d5cc045b10fc6993e9cfa7c9b6dfd61873702b (patch) | |
tree | e07c9d04e1962c703a177e432063018da1af64a2 | |
parent | 0de90d6589a4e11bdae9a6f8f1bab65156ea7c19 (diff) |
test suite: gitattributes: check that dotfiles work properly too
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
-rwxr-xr-x | tests/tests/gitattributes | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/tests/tests/gitattributes b/tests/tests/gitattributes index 0b361ad..bdc61f8 100755 --- a/tests/tests/gitattributes +++ b/tests/tests/gitattributes @@ -48,6 +48,9 @@ badattr () { t-git-config core.eol crlf +printf >>.dotfile-attr 'dotfiles too?\n' +echo >>gitattrs '.dotfile-attr filter=dgit-test-crazy-f' + badattr text auto badattr eol lf crlf badattr ident @@ -76,7 +79,7 @@ while read attr; do badattr $attr done -sha256sum af/* >sums +sha256sum .dotfile-attr af/* >sums # ----- common to source formats ----- @@ -101,7 +104,7 @@ sfmt_setup () { cp ../gitattrs .gitattributes $addpatch gitattrs - cp -a ../af . + cp -a ../af ../.dotfile-attr . $addpatch files cp ../sums . @@ -117,10 +120,10 @@ sums_check () { # $sums $branch # and check out $branch - sha256sum af/* >../$sums.checkout + sha256sum .dotfile-attr af/* >../$sums.checkout diff -U0 ../sums ../$sums.checkout - for f in af/*; do + for f in .dotfile-attr af/*; do git cat-file blob "refs/heads/$branch:$f" \ | sha256sum \ | sed -e 's#-$#'$f'#' \ @@ -135,7 +138,7 @@ sums_check_broken () { # $sums # and check out the broken branch - sha256sum af/* >../$sums.broken + sha256sum .dotfile-attr af/* >../$sums.broken for s in ../sums ../$sums.broken; do sed 's/[0-9a-f]* //' $s >$s.nosums @@ -187,7 +190,7 @@ sfmt_import () { t-dgit-warn-check 1 $dgitargs import-dsc ../$dscf +$branch git checkout $branch - touch af/* + touch .dotfile-attr af/* git reset --hard sums_check |