From: Ian Jackson Date: Sun, 16 Oct 2016 12:07:59 +0000 (+0100) Subject: Test suite: Filter out .../git-core from PATH so that we catch git-foo X-Git-Tag: archive/debian/2.1~3 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=a85458a7fc736f6d404622a427380a41f1248765;p=dgit.git Test suite: Filter out .../git-core from PATH so that we catch git-foo Signed-off-by: Ian Jackson --- diff --git a/debian/changelog b/debian/changelog index 9bf33e4f..e35438e2 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,7 +1,8 @@ dgit (2.1~~) unstable; urgency=medium * git- prefixes: Fix some occurrences of `git-foo' in infrastructure, - messages, and test suite. + messages, and test suite. Filter out .../git-core from PATH in + test suite so that we catch future occurrences. -- diff --git a/tests/lib b/tests/lib index 6401f933..275d3ef3 100644 --- a/tests/lib +++ b/tests/lib @@ -21,6 +21,8 @@ END trap 'test $? = 0 || t-report-failure' EXIT +t-filter-out-git-hyphen-dir + t-set-intree : ${DGIT_TEST_DEBUG=-D} diff --git a/tests/lib-core b/tests/lib-core index f3881ca5..b01a6eae 100644 --- a/tests/lib-core +++ b/tests/lib-core @@ -21,3 +21,14 @@ t-set-using-tmp () { export DGIT_TEST_TMP=$tmp export GNUPGHOME=$tmp/gnupg } + +t-filter-out-git-hyphen-dir () { + local pathent=$(type -p git-rev-parse ||:) + case "$pathent" in '') return ;; esac + pathent=${pathent%/*} + local path=":$PATH:" + path="${path//:$pathent:/}" + path="${path#:}" + path="${path%:}" + PATH="$path" +}