From 83c331e6033b40de9e52dc6552708e47f4aa5214 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Thu, 3 Aug 2017 12:22:33 +0100 Subject: test suite: dpkgsourceignores-correct: Test that the rune DTRT Signed-off-by: Ian Jackson --- tests/tests/dpkgsourceignores-correct | 53 +++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100755 tests/tests/dpkgsourceignores-correct (limited to 'tests/tests/dpkgsourceignores-correct') diff --git a/tests/tests/dpkgsourceignores-correct b/tests/tests/dpkgsourceignores-correct new file mode 100755 index 0000000..33de95e --- /dev/null +++ b/tests/tests/dpkgsourceignores-correct @@ -0,0 +1,53 @@ +#!/bin/bash +set -e +. tests/lib + +t-tstunt-parsechangelog + +t-archive example 1.0-1 +t-git-none + +t-dgit --no-rm-on-error clone $p + +cd $p + +bad-dpkg-source () { + t-expect-fail E:"dpkg-source:.*unexpected upstream changes" \ + t-dgit --quilt=nofix -wgf build-source + find * -name .git -print0 | xargs -0r rm -- +} + +ignores=$(t-dgit print-dpkg-source-ignores) + +spurious-git-must-be-excluded () { + dpkg-source $ignores -b . + mkdir check + cd check + dpkg-source -x ../../${p}_${v}.dsc + cd ${p}-${v%-*} + find -name .git >../bad + diff /dev/null ../bad + cd ../.. + find * -name .git -print0 | xargs -0r rm -rf -- + git clean -xdff +} + +mkdir docs/.git +echo hi >docs/.git/ho +spurious-git-must-be-excluded + +echo hi >docs/.git +spurious-git-must-be-excluded + +mkdir not-really.git +echo fee >not-really.git/something +echo fi >not-really.gitfoo +echo fo >some.git +echo fum >some.gitfoo +git add . +git commit -m 'want these' + +t-dgit --quilt=smash -wgf build-source +t-dgit -wgf push + +t-ok -- cgit v1.2.3