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
109 refname="import.$sfmt-$inst"
110 brkerr=stderr.$sfmt-$inst.broken
113 mkdir $pdb-import-$inst
118 t-dgit $dgitargs import-dsc ../$dscf +$refname.broken \
120 fgrep 'warning: source tree contains .gitattributes' ../$brkerr
121 git checkout $refname.broken
122 sha256sum af/* >../$sums.broken
124 for s in ../sums ../$sums.broken; do
125 sed 's/[0-9a-f]* //' $s >$s.nosums
127 diff -U0 ../sums.nosums ../$sums.broken.nosums
129 diff -U0 ../sums ../$sums.broken
134 t-dgit setup-new-tree
136 t-dgit $dgitargs import-dsc ../$dscf +$refname
137 git checkout $refname
139 sums=sums.$sfmt-$inst
142 git cat-file blob "refs/heads/$refname:$f" \
144 | sed -e 's#-$#'$f'#' \
152 : ----- generate the orig -----
154 origtar=${p}_${bv}.orig.tar.gz
156 tar --exclude=debian --exclude=.git -zcf $origtar $p
158 : ----- test 1.0 native -----
160 native_addpatch () { :; }
161 native_convert () { :; }
163 sfmt_setup 1.1 native
166 : ----- test 1.0 diff -----
168 diff_addpatch () { :; }
169 diff_convert () { :; }
174 : ----- test "3.0 (quilt)" -----
178 cat >../editor.pl <<END
180 s{^(description:).*}{\$1 dgit test patch $pname}i;
183 EDITOR="perl -pi $tmp/editor.pl" dpkg-source -iX --commit . $pname
184 test -f debian/patches/$pname
188 mkdir -p debian/source
189 echo '3.0 (quilt)' >debian/source/format
192 sfmt_setup 1.0-1 quilt
194 sfmt_import absurd --force-import-gitapply-absurd