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>
Jeff King committed
Aug 9, 2009 at 04:37 UTC
eaf0551d56b4fd3a97c8d0f5ded1ea6e891f9005
4 files changed
+4
-4
t/t3404-rebase-interactive.sh
+1
-1
@@ -10,7 +10,7 @@ that the result still makes sense.
10
'
11
. ./test-lib.sh
12
13
-. ../lib-rebase.sh
13
+. "$TEST_DIRECTORY"/lib-rebase.sh
14
15
set_fake_editor
16
t/t3411-rebase-preserve-around-merges.sh
+1
-1
@@ -10,7 +10,7 @@ a merge to before the merge.
10
'
11
. ./test-lib.sh
12
13
-. ../lib-rebase.sh
13
+. "$TEST_DIRECTORY"/lib-rebase.sh
14
15
set_fake_editor
16
t/t3414-rebase-preserve-onto.sh
+1
-1
@@ -10,7 +10,7 @@ aren'"'"'t on top of $ONTO, even if they are on top of $UPSTREAM.
10
'
11
. ./test-lib.sh
12
13
-. ../lib-rebase.sh
13
+. "$TEST_DIRECTORY"/lib-rebase.sh
14
15
# Set up branches like this:
16
# A1---B1---E1---F1---G1
t/t4020-diff-external.sh
+1
-1
@@ -166,7 +166,7 @@ test_expect_success 'diff --cached' '
166
git update-index --assume-unchanged file &&
167
echo second >file &&
168
git diff --cached >actual &&
169
- test_cmp ../t4020/diff.NUL actual
169
+ test_cmp "$TEST_DIRECTORY"/t4020/diff.NUL actual
170
'
171
172
test_done