summaryrefslogtreecommitdiff
path: root/t/t4014-format-patch.sh
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2009-08-09 08:38:11 (GMT)
committerJunio C Hamano <gitster@pobox.com>2009-08-09 17:49:34 (GMT)
commit91c8b825ce2a301e9861be60c3d7853fefa93c04 (patch)
tree4327e255850c62f711c4e0dd62b2818f8090c3a1 /t/t4014-format-patch.sh
parenteaf0551d56b4fd3a97c8d0f5ded1ea6e891f9005 (diff)
downloadgit-91c8b825ce2a301e9861be60c3d7853fefa93c04.zip
git-91c8b825ce2a301e9861be60c3d7853fefa93c04.tar.gz
git-91c8b825ce2a301e9861be60c3d7853fefa93c04.tar.bz2
tests: provide $TRASH_DIRECTORY variable
Most scripts don't care about the absolute path to the trash directory. The one exception was t4014 script, which pieced together $TEST_DIRECTORY and $test itself to get an absolute directory. Instead, let's provide a $TRASH_DIRECTORY which specifies the same thing. This keeps the $test variable internal to test-lib.sh and paves the way for trash directories in other locations. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4014-format-patch.sh')
-rwxr-xr-xt/t4014-format-patch.sh3
1 files changed, 1 insertions, 2 deletions
diff --git a/t/t4014-format-patch.sh b/t/t4014-format-patch.sh
index 922a894..531f5b7 100755
--- a/t/t4014-format-patch.sh
+++ b/t/t4014-format-patch.sh
@@ -493,13 +493,12 @@ test_expect_success 'format-patch from a subdirectory (2)' '
'
test_expect_success 'format-patch from a subdirectory (3)' '
- here="$TEST_DIRECTORY/$test" &&
rm -f 0* &&
filename=$(
rm -rf sub &&
mkdir -p sub/dir &&
cd sub/dir &&
- git format-patch -1 -o "$here"
+ git format-patch -1 -o "$TRASH_DIRECTORY"
) &&
basename=$(expr "$filename" : ".*/\(.*\)") &&
test -f "$basename"