diff options
author | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2016-10-09 13:57:28 +0100 |
---|---|---|
committer | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2016-10-10 01:01:11 +0100 |
commit | 7242402070505378d702b476e54f19c9b635b03e (patch) | |
tree | 46f8267b4f5589b0c5487d0416f7a16f34fab973 /tests/tests | |
parent | 31bab49c4f673e84a1dd88ad055a134543af654b (diff) |
Test suite: mismatch: New test
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Diffstat (limited to 'tests/tests')
-rwxr-xr-x | tests/tests/mismatches | 34 |
1 files changed, 34 insertions, 0 deletions
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. |