Code

Merge branch 'maint' of git://repo.or.cz/git-gui into maint
[git.git] / t / test-lib.sh
index 401011001016ac9df11fd64bd668dd073dc0e4dc..689ac2f4b4eb45ee5f45f74e4c5d13c3e7c17e84 100644 (file)
@@ -35,6 +35,7 @@ unset GIT_WORK_TREE
 unset GIT_EXTERNAL_DIFF
 unset GIT_INDEX_FILE
 unset GIT_OBJECT_DIRECTORY
+unset GIT_CEILING_DIRECTORIES
 unset SHA1_FILE_DIRECTORIES
 unset SHA1_FILE_DIRECTORY
 GIT_MERGE_VERBOSITY=5
@@ -111,8 +112,9 @@ if test -n "$color"; then
                        *) test -n "$quiet" && return;;
                esac
                shift
-               echo "* $*"
+               printf "* %s" "$*"
                tput sgr0
+               echo
                )
        }
 else
@@ -378,7 +380,7 @@ test_external_without_stderr () {
 
 test_must_fail () {
        "$@"
-       test $? -gt 0 -a $? -le 129
+       test $? -gt 0 -a $? -le 129 -o $? -gt 192
 }
 
 # test_cmp is a helper function to compare actual and expected output.
@@ -407,7 +409,7 @@ test_create_repo () {
        repo="$1"
        mkdir "$repo"
        cd "$repo" || error "Cannot setup test environment"
-       "$GIT_EXEC_PATH/git" init "--template=$GIT_EXEC_PATH/templates/blt/" >/dev/null 2>&1 ||
+       "$GIT_EXEC_PATH/git" init "--template=$GIT_EXEC_PATH/templates/blt/" >&3 2>&4 ||
        error "cannot run git init -- have you built things yet?"
        mv .git/hooks .git/hooks-disabled
        cd "$owd"