5 t-dependencies bsdgames
6 t-dependencies man-db git-man
7 t-tstunt-parsechangelog
14 : ----- prepare badnesses -----
21 echo >>af/$filename "Test file with $attrspec"
22 printf >>af/$filename 'crlf: \r\n'
23 echo >>af/$filename 'id $Id: $'
24 echo >>af/$filename 'id $Id: SPLARK $'
25 echo >>gitattrs "af/$filename" "$attrspec"
30 badattr1 $attrname-set $attrname
31 badattr1 $attrname-unset -$attrname
32 badattr1 $attrname-unspec \!$attrname
35 badattr1 $attrname=$val $attrname=$val
39 # xxx want to make each of these files into a quilt patch
41 t-git-config core.eol crlf
47 t-git-config filter.dgit-test-crazy-f.smudge '/usr/games/rot13 2'
48 t-git-config filter.dgit-test-crazy-f.clean '/usr/games/rot13 24'
49 t-git-config filter.dgit-test-crazy-f.requrired true
51 badattr filter dgit-test-crazy-f
54 badattr merge text binary union
59 badattr encoding no-such-encoding
62 | perl -ne 'print $1,"\n" if m/^ *(\w[-a-z]*)$/' \
72 # ----- common to source formats -----
80 local addpatch=${sfmt}_addpatch
81 local convert=${sfmt}_convert
92 cp ../gitattrs .gitattributes
107 # caller should cd into working directory, set
109 # and check out $branch
111 sha256sum af/* >../$sums.checkout
112 diff -U0 ../sums ../$sums.checkout
115 git cat-file blob "refs/heads/$branch:$f" \
117 | sed -e 's#-$#'$f'#' \
121 diff -U0 ../sums ../$sums
127 branch="import.$sfmt-$inst"
128 brkerr=stderr.$sfmt-$inst.broken
130 sums=sums.$sfmt-$inst
138 t-dgit $dgitargs import-dsc ../$dscf +$branch.broken \
140 fgrep 'warning: source tree contains .gitattributes' ../$brkerr
141 git checkout $branch.broken
142 sha256sum af/* >../$sums.broken
144 for s in ../sums ../$sums.broken; do
145 sed 's/[0-9a-f]* //' $s >$s.nosums
147 diff -U0 ../sums.nosums ../$sums.broken.nosums
149 diff -U0 ../sums ../$sums.broken
154 t-dgit setup-new-tree
156 t-dgit $dgitargs import-dsc ../$dscf +$branch
165 : ----- generate the orig -----
167 origtar=${p}_${bv}.orig.tar.gz
169 tar --exclude=debian --exclude=.git -zcf $origtar $p
171 : ----- test 1.0 native -----
173 native_addpatch () { :; }
174 native_convert () { :; }
176 sfmt_setup 1.1 native
179 : ----- test 1.0 diff -----
181 diff_addpatch () { :; }
182 diff_convert () { :; }
187 : ----- test "3.0 (quilt)" -----
191 cat >../editor.pl <<END
193 s{^(description:).*}{\$1 dgit test patch $pname}i;
196 EDITOR="perl -pi $tmp/editor.pl" dpkg-source -iX --commit . $pname
197 test -f debian/patches/$pname
201 mkdir -p debian/source
202 echo '3.0 (quilt)' >debian/source/format
205 sfmt_setup 1.0-1 quilt
207 sfmt_import absurd --force-import-gitapply-absurd