tests: use "$TEST_DIRECTORY" instead of ".."

The $TEST_DIRECTORY variable allows tests to find the
top-level test directory regardless of the current working
directory.

In the past, this has been used to accomodate tests which
change directories, but it is also the first step to being
able to move trash directories outside of the
$TEST_DIRECTORY hierarchy.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Jeff King 2009-08-09 04:37:52 -04:00 committed by Junio C Hamano
parent d82e75e86c
commit eaf0551d56
4 changed files with 4 additions and 4 deletions

View File

@ -10,7 +10,7 @@ that the result still makes sense.
' '
. ./test-lib.sh . ./test-lib.sh
. ../lib-rebase.sh . "$TEST_DIRECTORY"/lib-rebase.sh
set_fake_editor set_fake_editor

View File

@ -10,7 +10,7 @@ a merge to before the merge.
' '
. ./test-lib.sh . ./test-lib.sh
. ../lib-rebase.sh . "$TEST_DIRECTORY"/lib-rebase.sh
set_fake_editor set_fake_editor

View File

@ -10,7 +10,7 @@ aren'"'"'t on top of $ONTO, even if they are on top of $UPSTREAM.
' '
. ./test-lib.sh . ./test-lib.sh
. ../lib-rebase.sh . "$TEST_DIRECTORY"/lib-rebase.sh
# Set up branches like this: # Set up branches like this:
# A1---B1---E1---F1---G1 # A1---B1---E1---F1---G1

View File

@ -166,7 +166,7 @@ test_expect_success 'diff --cached' '
git update-index --assume-unchanged file && git update-index --assume-unchanged file &&
echo second >file && echo second >file &&
git diff --cached >actual && git diff --cached >actual &&
test_cmp ../t4020/diff.NUL actual test_cmp "$TEST_DIRECTORY"/t4020/diff.NUL actual
' '
test_done test_done