X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=tests%2Flib-core;h=056a1bc188c49f568df6046af46f94d2907c7f73;hb=7b98714769cf69198c85113476b65f07455305e8;hp=f3881ca561c008c407ca24755cdc9facce646039;hpb=d228327cc4aec6fef736c5d44abb0edf025a57f0;p=dgit.git diff --git a/tests/lib-core b/tests/lib-core index f3881ca5..056a1bc1 100644 --- a/tests/lib-core +++ b/tests/lib-core @@ -19,5 +19,16 @@ t-set-using-tmp () { export HOME=$tmp export DGIT_TEST_DUMMY_DIR=$tmp export DGIT_TEST_TMP=$tmp - export GNUPGHOME=$tmp/gnupg + export GNUPGHOME=$tmp/nonexistent +} + +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" }