test-lib: do not remove trash_directory if called with --debug

Sometimes you want to keep the trash directory, even if all tests
passed.  For example, when extending tests, it comes it quite handy.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Johannes Schindelin 2008-08-21 09:49:12 +02:00 committed by Junio C Hamano
parent 4be636f42c
commit 5a4a088add

View File

@ -491,7 +491,7 @@ fi
# Test repository
test="trash directory.$(basename "$0" .sh)"
remove_trash="$TEST_DIRECTORY/$test"
test ! -z "$debug" || remove_trash="$TEST_DIRECTORY/$test"
rm -fr "$test" || {
trap - exit
echo >&5 "FATAL: Cannot prepare test area"