From a85458a7fc736f6d404622a427380a41f1248765 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sun, 16 Oct 2016 13:07:59 +0100 Subject: Test suite: Filter out .../git-core from PATH so that we catch git-foo Signed-off-by: Ian Jackson --- tests/lib-core | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'tests/lib-core') diff --git a/tests/lib-core b/tests/lib-core index f3881ca..b01a6ea 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" +} -- cgit v1.2.3