chiark
/
gitweb
/
~ianmdlvl
/
dgit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
test suite: gitattributes: Rename $branch (from $refname)
[dgit.git]
/
tests
/
tests
/
gitattributes
diff --git
a/tests/tests/gitattributes
b/tests/tests/gitattributes
index 2e24bba3ab7adfdaf33290fba28740cdd80d2f63..fd3faa35899acc3e43bd5870ee5b7e7c4773150e 100755
(executable)
--- a/
tests/tests/gitattributes
+++ b/
tests/tests/gitattributes
@@
-3,9
+3,11
@@
set -e
. tests/lib
t-dependencies bsdgames
. tests/lib
t-dependencies bsdgames
+t-dependencies man-db git-man
t-tstunt-parsechangelog
t-archive-none example
t-tstunt-parsechangelog
t-archive-none example
+t-git-none
bv=1.0
t-worktree $bv
bv=1.0
t-worktree $bv
@@
-56,6
+58,15
@@
badattr export-subst
badattr delta
badattr encoding no-such-encoding
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 -----
sha256sum af/* >sums
# ----- common to source formats -----
@@
-95,18
+106,20
@@
sfmt_setup () {
sfmt_import () {
inst=$1
dgitargs=$2
sfmt_import () {
inst=$1
dgitargs=$2
-
refname
="import.$sfmt-$inst"
+
branch
="import.$sfmt-$inst"
brkerr=stderr.$sfmt-$inst.broken
brkerr=stderr.$sfmt-$inst.broken
+ dscf=${p}_${v}.dsc
+ sums=sums.$sfmt-$inst
mkdir $pdb-import-$inst
cd $pdb-import-$inst
git init
LC_MESSAGES=C \
mkdir $pdb-import-$inst
cd $pdb-import-$inst
git init
LC_MESSAGES=C \
- t-dgit $dgitargs import-dsc ../$
{p}_${v}.dsc +$refname
.broken \
+ t-dgit $dgitargs import-dsc ../$
dscf +$branch
.broken \
2>&1 |tee ../$brkerr
fgrep 'warning: source tree contains .gitattributes' ../$brkerr
2>&1 |tee ../$brkerr
fgrep 'warning: source tree contains .gitattributes' ../$brkerr
- git checkout $
refname
.broken
+ git checkout $
branch
.broken
sha256sum af/* >../$sums.broken
for s in ../sums ../$sums.broken; do
sha256sum af/* >../$sums.broken
for s in ../sums ../$sums.broken; do
@@
-121,13
+134,11
@@
sfmt_import () {
t-dgit setup-new-tree
t-dgit setup-new-tree
- t-dgit $dgitargs import-dsc ../${p}_${v}.dsc +$refname
- git checkout $refname
-
- sums=sums.$sfmt-$inst
+ t-dgit $dgitargs import-dsc ../$dscf +$branch
+ git checkout $branch
for f in af/*; do
for f in af/*; do
- git cat-file blob "refs/heads/$
refname
:$f" \
+ git cat-file blob "refs/heads/$
branch
:$f" \
| sha256sum \
| sed -e 's#-$#'$f'#' \
>>../$sums
| sha256sum \
| sed -e 's#-$#'$f'#' \
>>../$sums
@@
-139,7
+150,9
@@
sfmt_import () {
: ----- generate the orig -----
: ----- generate the orig -----
-tar --exclude=debian --exclude=.git -zcf ${p}_${bv}.orig.tar.gz $p
+origtar=${p}_${bv}.orig.tar.gz
+
+tar --exclude=debian --exclude=.git -zcf $origtar $p
: ----- test 1.0 native -----
: ----- test 1.0 native -----
@@
-157,7
+170,7
@@
diff_convert () { :; }
sfmt_setup 1.1 diff
sfmt_import norm
sfmt_setup 1.1 diff
sfmt_import norm
-: ----- test "3.0 (quilt)"
+: ----- test "3.0 (quilt)"
-----
quilt_addpatch () {
pname=$1
quilt_addpatch () {
pname=$1