path.c: Remove the 'git_' prefix from a file scope function
[gitweb.git] / t / t9903-bash-prompt.sh
index f8fb93f687d055992c25a039e1c057aaae506dde..f17c1f8b85b3fa1ace61a1d8877844dcef5080d0 100755 (executable)
@@ -85,7 +85,7 @@ test_expect_success 'gitdir - parent is a .git directory' '
        test_cmp expected "$actual"
 '
 
-test_expect_failure 'gitdir - $GIT_DIR set while .git directory in cwd' '
+test_expect_success 'gitdir - $GIT_DIR set while .git directory in cwd' '
        echo "$TRASH_DIRECTORY/otherrepo/.git" > expected &&
        (
                GIT_DIR="$TRASH_DIRECTORY/otherrepo/.git" &&
@@ -106,6 +106,14 @@ test_expect_success 'gitdir - $GIT_DIR set while .git directory in parent' '
        test_cmp expected "$actual"
 '
 
+test_expect_success 'gitdir - non-existing $GIT_DIR' '
+       (
+               GIT_DIR="$TRASH_DIRECTORY/non-existing" &&
+               export GIT_DIR &&
+               test_must_fail __gitdir
+       )
+'
+
 test_expect_success 'gitdir - gitfile in cwd' '
        echo "$TRASH_DIRECTORY/otherrepo/.git" > expected &&
        echo "gitdir: $TRASH_DIRECTORY/otherrepo/.git" > subdir/.git &&