@matheusbsbs / matheus-bagliano / commits / 5a4a088add
Fork 0

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>

Johannes Schindelin committed Aug 21, 2008 at 09:49 UTC 5a4a088add3bdcbe86ae7e87964ce4025ddbc389
1 file changed +1 -1
t/test-lib.sh
+1 -1
@@ -491,7 +491,7 @@ fi
491
492 # Test repository
493 test="trash directory.$(basename "$0" .sh)"
494 -remove_trash="$TEST_DIRECTORY/$test"
494 +test ! -z "$debug" || remove_trash="$TEST_DIRECTORY/$test"
495 rm -fr "$test" || {
496 trap - exit
497 echo >&5 "FATAL: Cannot prepare test area"