Skip to content

Commit

Permalink
tests: use "$TEST_DIRECTORY" instead of ".."
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jeff King authored and Junio C Hamano committed Aug 9, 2009
1 parent d82e75e commit eaf0551
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion t/t3404-rebase-interactive.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ that the result still makes sense.
'
. ./test-lib.sh

. ../lib-rebase.sh
. "$TEST_DIRECTORY"/lib-rebase.sh

set_fake_editor

Expand Down
2 changes: 1 addition & 1 deletion t/t3411-rebase-preserve-around-merges.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ a merge to before the merge.
'
. ./test-lib.sh

. ../lib-rebase.sh
. "$TEST_DIRECTORY"/lib-rebase.sh

set_fake_editor

Expand Down
2 changes: 1 addition & 1 deletion t/t3414-rebase-preserve-onto.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ aren'"'"'t on top of $ONTO, even if they are on top of $UPSTREAM.
'
. ./test-lib.sh

. ../lib-rebase.sh
. "$TEST_DIRECTORY"/lib-rebase.sh

# Set up branches like this:
# A1---B1---E1---F1---G1
Expand Down
2 changes: 1 addition & 1 deletion t/t4020-diff-external.sh
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ test_expect_success 'diff --cached' '
git update-index --assume-unchanged file &&
echo second >file &&
git diff --cached >actual &&
test_cmp ../t4020/diff.NUL actual
test_cmp "$TEST_DIRECTORY"/t4020/diff.NUL actual
'

test_done

0 comments on commit eaf0551

Please sign in to comment.