chiark / gitweb /
Test suite: orig-include-exclude: Move bulk into a lib-*
[dgit.git] / tests / lib-core
index f3881ca561c008c407ca24755cdc9facce646039..056a1bc188c49f568df6046af46f94d2907c7f73 100644 (file)
@@ -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"
 }