5 t-dependencies bsdgames
6 t-dependencies man-db git-man
7 t-tstunt-parsechangelog
13 : ----- prepare badnesses -----
20 echo >>af/$filename "Test file with $attrspec"
21 printf >>af/$filename 'crlf: \r\n'
22 echo >>af/$filename 'id $Id: $'
23 echo >>af/$filename 'id $Id: SPLARK $'
24 echo >>gitattrs "af/$filename" "$attrspec"
29 badattr1 $attrname-set $attrname
30 badattr1 $attrname-unset -$attrname
31 badattr1 $attrname-unspec \!$attrname
34 badattr1 $attrname=$val $attrname=$val
38 # xxx want to make each of these files into a quilt patch
40 t-git-config core.eol crlf
46 t-git-config filter.dgit-test-crazy-f.smudge '/usr/games/rot13 2'
47 t-git-config filter.dgit-test-crazy-f.clean '/usr/games/rot13 24'
48 t-git-config filter.dgit-test-crazy-f.requrired true
50 badattr filter dgit-test-crazy-f
53 badattr merge text binary union
58 badattr encoding no-such-encoding
61 | perl -ne 'print $1,"\n" if m/^ *(\w[-a-z]*)$/' \
71 # ----- common to source formats -----
79 local addpatch=${sfmt}_addpatch
80 local convert=${sfmt}_convert
91 cp ../gitattrs .gitattributes
108 refname="import.$sfmt-$inst"
109 brkerr=stderr.$sfmt-$inst.broken
112 mkdir $pdb-import-$inst
117 t-dgit $dgitargs import-dsc ../$dscf +$refname.broken \
119 fgrep 'warning: source tree contains .gitattributes' ../$brkerr
120 git checkout $refname.broken
121 sha256sum af/* >../$sums.broken
123 for s in ../sums ../$sums.broken; do
124 sed 's/[0-9a-f]* //' $s >$s.nosums
126 diff -U0 ../sums.nosums ../$sums.broken.nosums
128 diff -U0 ../sums ../$sums.broken
133 t-dgit setup-new-tree
135 t-dgit $dgitargs import-dsc ../$dscf +$refname
136 git checkout $refname
138 sums=sums.$sfmt-$inst
141 git cat-file blob "refs/heads/$refname:$f" \
143 | sed -e 's#-$#'$f'#' \
151 : ----- generate the orig -----
153 tar --exclude=debian --exclude=.git -zcf ${p}_${bv}.orig.tar.gz $p
155 : ----- test 1.0 native -----
157 native_addpatch () { :; }
158 native_convert () { :; }
160 sfmt_setup 1.1 native
163 : ----- test 1.0 diff -----
165 diff_addpatch () { :; }
166 diff_convert () { :; }
171 : ----- test "3.0 (quilt)" -----
175 cat >../editor.pl <<END
177 s{^(description:).*}{\$1 dgit test patch $pname}i;
180 EDITOR="perl -pi $tmp/editor.pl" dpkg-source -iX --commit . $pname
181 test -f debian/patches/$pname
185 mkdir -p debian/source
186 echo '3.0 (quilt)' >debian/source/format
189 sfmt_setup 1.0-1 quilt
191 sfmt_import absurd --force-import-gitapply-absurd