summaryrefslogtreecommitdiff
path: root/tests/tests/mismatches-dscchanges
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2016-10-09 22:14:48 +0100
committerIan Jackson <ijackson@chiark.greenend.org.uk>2016-10-10 01:04:29 +0100
commit3d70fbf05b9b0ff766dd2f837e3ed962eef36cf4 (patch)
treef05a3727510c2ecc61b3e2cfda57a3db904a31ce /tests/tests/mismatches-dscchanges
parentd76f34bfa71c438efec0aadf37482dea6360968a (diff)
Test suite: Rename mismatches-dscchanges
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Diffstat (limited to 'tests/tests/mismatches-dscchanges')
-rwxr-xr-xtests/tests/mismatches-dscchanges34
1 files changed, 34 insertions, 0 deletions
diff --git a/tests/tests/mismatches-dscchanges b/tests/tests/mismatches-dscchanges
new file mode 100755
index 0000000..9bb554e
--- /dev/null
+++ b/tests/tests/mismatches-dscchanges
@@ -0,0 +1,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
+
+echo ok.