5 t-dependencies bsdgames
6 t-tstunt-parsechangelog
12 : ----- prepare badnesses -----
19 echo >>af/$filename "Test file with $attrspec"
20 printf >>af/$filename 'crlf: \r\n'
21 echo >>af/$filename 'id $Id: $'
22 echo >>af/$filename 'id $Id: SPLARK $'
23 echo >>gitattrs "af/$filename" "$attrspec"
28 badattr1 $attrname-set $attrname
29 badattr1 $attrname-unset -$attrname
30 badattr1 $attrname-unspec \!$attrname
33 badattr1 $attrname=$val $attrname=$val
37 # xxx want to make each of these files into a quilt patch
39 t-git-config core.eol crlf
45 t-git-config filter.dgit-test-crazy-f.smudge '/usr/games/rot13 2'
46 t-git-config filter.dgit-test-crazy-f.clean '/usr/games/rot13 24'
47 t-git-config filter.dgit-test-crazy-f.requrired true
49 badattr filter dgit-test-crazy-f
52 badattr merge text binary union
57 badattr encoding no-such-encoding
61 # ----- common to source formats -----
69 local addpatch=${sfmt}_addpatch
70 local convert=${sfmt}_convert
81 cp ../gitattrs .gitattributes
98 refname="import.$sfmt-$inst"
99 brkerr=stderr.$sfmt-$inst.broken
101 mkdir $pdb-import-$inst
106 t-dgit $dgitargs import-dsc ../${p}_${v}.dsc +$refname.broken \
108 fgrep 'warning: source tree contains .gitattributes' ../$brkerr
109 git checkout $refname.broken
110 sha256sum af/* >../$sums.broken
112 for s in ../sums ../$sums.broken; do
113 sed 's/[0-9a-f]* //' $s >$s.nosums
115 diff -U0 ../sums.nosums ../$sums.broken.nosums
117 diff -U0 ../sums ../$sums.broken
122 t-dgit setup-new-tree
124 t-dgit $dgitargs import-dsc ../${p}_${v}.dsc +$refname
125 git checkout $refname
127 sums=sums.$sfmt-$inst
130 git cat-file blob "refs/heads/$refname:$f" \
132 | sed -e 's#-$#'$f'#' \
140 : ----- generate the orig -----
142 tar --exclude=debian --exclude=.git -zcf ${p}_${bv}.orig.tar.gz $p
144 : ----- test 1.0 native -----
146 native_addpatch () { :; }
147 native_convert () { :; }
149 sfmt_setup 1.1 native
152 : ----- test 1.0 diff -----
154 diff_addpatch () { :; }
155 diff_convert () { :; }
160 : ----- test "3.0 (quilt)"
164 cat >../editor.pl <<END
166 s{^(description:).*}{\$1 dgit test patch $pname}i;
169 EDITOR="perl -pi $tmp/editor.pl" dpkg-source -iX --commit . $pname
170 test -f debian/patches/$pname
174 mkdir -p debian/source
175 echo '3.0 (quilt)' >debian/source/format
178 sfmt_setup 1.0-1 quilt
180 sfmt_import absurd --force-import-gitapply-absurd