diff --git a/t/test-lib.sh b/t/test-lib.sh
index 35698361bac232412d51f2b64c45c7ab5a5041d2..8936173ee204c589fb299837586b4866722b2388 100644 (file)
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
*) test -n "$quiet" && return;;
esac
shift
*) test -n "$quiet" && return;;
esac
shift
- printf "* $*"
+ printf "* %s" "$*"
tput sgr0
echo
)
tput sgr0
echo
)
error "bug in the test script: not 1 parameter to test-create-repo"
owd=`pwd`
repo="$1"
error "bug in the test script: not 1 parameter to test-create-repo"
owd=`pwd`
repo="$1"
- mkdir "$repo"
+ mkdir -p "$repo"
cd "$repo" || error "Cannot setup test environment"
"$GIT_EXEC_PATH/git" init "--template=$GIT_EXEC_PATH/templates/blt/" >&3 2>&4 ||
error "cannot run git init -- have you built things yet?"
cd "$repo" || error "Cannot setup test environment"
"$GIT_EXEC_PATH/git" init "--template=$GIT_EXEC_PATH/templates/blt/" >&3 2>&4 ||
error "cannot run git init -- have you built things yet?"
# we will leave things as they are.
say_color pass "passed all $msg"
# we will leave things as they are.
say_color pass "passed all $msg"
+
+ test -d "$remove_trash" &&
+ cd "$(dirname "$remove_trash")" &&
+ rm -rf "$(basename "$remove_trash")"
+
exit 0 ;;
*)
exit 0 ;;
*)
. ../GIT-BUILD-OPTIONS
# Test repository
. ../GIT-BUILD-OPTIONS
# Test repository
-test="trash directory"
+test="trash directory.$(basename "$0" .sh)"
+test ! -z "$debug" || remove_trash="$TEST_DIRECTORY/$test"
rm -fr "$test" || {
trap - exit
echo >&5 "FATAL: Cannot prepare test area"
rm -fr "$test" || {
trap - exit
echo >&5 "FATAL: Cannot prepare test area"