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"
100 mkdir $pdb-import-$inst
104 t-dgit $dgitargs import-dsc ../${p}_${v}.dsc +$refname.broken
105 git checkout $refname.broken
106 sha256sum af/* >../$sums.broken
108 for s in ../sums ../$sums.broken; do
109 sed 's/[0-9a-f]* //' $s >$s.nosums
111 diff -U0 ../sums.nosums ../$sums.broken.nosums
113 diff -U0 ../sums ../$sums.broken
118 t-dgit setup-new-tree
120 t-dgit $dgitargs import-dsc ../${p}_${v}.dsc +$refname
121 git checkout $refname
123 sums=sums.$sfmt-$inst
126 git cat-file blob "refs/heads/$refname:$f" \
128 | sed -e 's#-$#'$f'#' \
136 : ----- generate the orig -----
138 tar --exclude=debian -zcf ${p}_${bv}.orig.tar.gz $p
140 : ----- test 1.0 native -----
142 native_addpatch () { :; }
143 native_convert () { :; }
145 sfmt_setup 1.1 native
148 : ----- test 1.0 diff -----
150 diff_addpatch () { :; }
151 diff_convert () { :; }
156 : ----- test "3.0 (quilt)"
160 cat >../editor.pl <<END
162 s{^(description:).*}{\$1 dgit test patch $pname}i;
165 EDITOR="perl -pi $tmp/editor.pl" dpkg-source -iX --commit . $pname
166 test -f debian/patches/$pname
170 mkdir -p debian/source
171 echo '3.0 (quilt)' >debian/source/format
174 sfmt_setup 1.0-1 quilt
176 sfmt_import absurd --force-import-gitapply-absurd