t/test-lib.sh: fix TRASH_DIRECTORY handling
commit38b074de80759c95fec20b0dbc30614caccdfd24
authorJohn Keeping <john@keeping.me.uk>
Sun, 14 Apr 2013 16:34:56 +0000 (14 17:34 +0100)
committerJunio C Hamano <gitster@pobox.com>
Mon, 15 Apr 2013 06:30:21 +0000 (14 23:30 -0700)
tree213b0d764e72c0b2a877c43195a10bec8041d863
parenta46221e9adcf3deb88c4fc904859205bf87f784c
t/test-lib.sh: fix TRASH_DIRECTORY handling

After the location of $TRASH_DIRECTORY is adjusted by
$TEST_OUTPUT_DIRECTORY, we go on to use the $test variable to make the
trash directory and cd into it.  This means that when
$TEST_OUTPUT_DIRECTORY is not "." and an absolute --root has not been
specified, we do not remove the trash directory once the tests are
complete (remove_trash is set to $TRASH_DIRECTORY).

Fix this by always referring to the trash directory as $TRASH_DIRECTORY.

Signed-off-by: John Keeping <john@keeping.me.uk>
Acked-by: Jeff King <peff@peff.net>
Acked-by: Thomas Rast <trast@inf.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/test-lib.sh