From 7242402070505378d702b476e54f19c9b635b03e Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sun, 9 Oct 2016 13:57:28 +0100 Subject: Test suite: mismatch: New test Signed-off-by: Ian Jackson --- tests/tests/mismatches | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100755 tests/tests/mismatches (limited to 'tests') diff --git a/tests/tests/mismatches b/tests/tests/mismatches new file mode 100755 index 0000000..9bb554e --- /dev/null +++ b/tests/tests/mismatches @@ -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. -- cgit v1.2.3