git p4 test: explicitly check p4 wildcard delete
[gitweb.git] / t / test-lib.sh
index 9802b0b0e99dfb9019c9839a040b6f54fe040ea0..d303e6c943ab94e15e65fb8a51cbe871cf9ef544 100644 (file)
@@ -26,6 +26,10 @@ then
        # outside of t/, e.g. for running tests on the test library
        # itself.
        TEST_DIRECTORY=$(pwd)
+else
+       # ensure that TEST_DIRECTORY is an absolute path so that it
+       # is valid even if the current working directory is changed
+       TEST_DIRECTORY=$(cd "$TEST_DIRECTORY" && pwd) || exit 1
 fi
 if test -z "$TEST_OUTPUT_DIRECTORY"
 then
@@ -752,6 +756,7 @@ case $(uname -s) in
        test_set_prereq NOT_CYGWIN
        test_set_prereq SED_STRIPS_CR
        test_set_prereq GREP_STRIPS_CR
+       GIT_TEST_CMP=mingw_test_cmp
        ;;
 *CYGWIN*)
        test_set_prereq POSIXPERM