Merge branch 'maint-1.7.11' into maint
[git.git] / t / t9903-bash-prompt.sh
index a6c9ce94357b958714b3c2cead0b988b6fef4874..f17c1f8b85b3fa1ace61a1d8877844dcef5080d0 100755 (executable)
@@ -7,7 +7,7 @@ test_description='test git-specific bash prompt functions'
 
 . ./lib-bash.sh
 
-. "$GIT_BUILD_DIR/contrib/completion/git-completion.bash"
+. "$GIT_BUILD_DIR/contrib/completion/git-prompt.sh"
 
 actual="$TRASH_DIRECTORY/actual"
 
@@ -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 &&