summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArmin Kunaschik <megabreit@googlemail.com>2016-07-02 21:01:51 +0200
committerJunio C Hamano <gitster@pobox.com>2016-07-06 12:18:09 -0700
commitc578a09bd6310157ea69bb1d2ec2d3d2cc58c85a (patch)
treec4ae88302c134528606c264fe974076632e704fa
parent2ff7dff01e620dc87144e076d5bb7e866377df6a (diff)
downloadgit-c578a09bd6310157ea69bb1d2ec2d3d2cc58c85a.tar.gz
t7610: test for mktemp before test execution
mktemp is not available on all platforms, so the test 'temporary filenames are used with mergetool.writeToTemp' fails there. This patch does not replace mktemp but just disables the test that otherwise would fail. mergetool checks itself before executing mktemp and reports an error. Signed-off-by: Armin Kunaschik <megabreit@googlemail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rwxr-xr-xt/t7610-mergetool.sh7
1 files changed, 6 insertions, 1 deletions
diff --git a/t/t7610-mergetool.sh b/t/t7610-mergetool.sh
index 76306cf268..7217f3968d 100755
--- a/t/t7610-mergetool.sh
+++ b/t/t7610-mergetool.sh
@@ -589,7 +589,12 @@ test_expect_success 'filenames seen by tools start with ./' '
git reset --hard master >/dev/null 2>&1
'
-test_expect_success 'temporary filenames are used with mergetool.writeToTemp' '
+test_lazy_prereq MKTEMP '
+ tempdir=$(mktemp -d -t foo.XXXXXX) &&
+ test -d "$tempdir"
+'
+
+test_expect_success MKTEMP 'temporary filenames are used with mergetool.writeToTemp' '
git checkout -b test16 branch1 &&
test_config mergetool.writeToTemp true &&
test_config mergetool.myecho.cmd "echo \"\$LOCAL\"" &&