summaryrefslogtreecommitdiff
path: root/tests/tests/mismatches-dscchanges
blob: 85c70866ba8c212748c8e1cdee50559f3c949c9b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/bash
set -e
. tests/lib

t-tstunt-parsechangelog

t-prep-newpackage example 1.0

cd $p
revision=1

check () {
	local fext=$1
	local emsgpat=$2

	t-dgit -wgf build-source

	perl -i~ -pe 's/^ ([0-9a-f])/ sprintf " %x", (hex $1)^1 /e' \
		../*.$fext

	t-expect-fail "$emsgpat" \
	t-dgit -wgf push --new
}

check dsc E:'dpkg-source.*error.*checksum'
check changes E:'dgit.*hash or size.*varies'

# and finally check that our test is basically working

t-dgit -wgf build-source

t-dgit -wgf push --new

t-ok