chiark / gitweb /
git-debrebase: provide breakwater command
[dgit.git] / tests / tests / mismatches-dscchanges
1 #!/bin/bash
2 set -e
3 . tests/lib
4
5 t-tstunt-parsechangelog
6
7 t-prep-newpackage example 1.0
8
9 cd $p
10 revision=1
11
12 check () {
13         local fext=$1
14         local emsgpat=$2
15
16         t-dgit -wgf build-source
17
18         perl -i~ -pe 's/^ ([0-9a-f])/ sprintf " %x", (hex $1)^1 /e' \
19                 ../*.$fext
20
21         t-expect-fail "$emsgpat" \
22         t-dgit -wgf push --new
23 }
24
25 check dsc E:'dpkg-source.*error.*checksum'
26 check changes E:'dgit.*hash or size.*varies'
27
28 # and finally check that our test is basically working
29
30 t-dgit -wgf build-source
31
32 t-dgit -wgf push --new
33
34 t-ok