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>
Armin Kunaschik committed
Jul 2, 2016 at 21:01 UTC
c578a09bd6310157ea69bb1d2ec2d3d2cc58c85a
1 file changed
+6
-1
t/t7610-mergetool.sh
+6
-1
@@ -589,7 +589,12 @@ test_expect_success 'filenames seen by tools start with ./' '
589
git reset --hard master >/dev/null 2>&1
590
'
591
592
-test_expect_success 'temporary filenames are used with mergetool.writeToTemp' '
592
+test_lazy_prereq MKTEMP '
593
+ tempdir=$(mktemp -d -t foo.XXXXXX) &&
594
+ test -d "$tempdir"
595
+'
596
+
597
+test_expect_success MKTEMP 'temporary filenames are used with mergetool.writeToTemp' '
598
git checkout -b test16 branch1 &&
599
test_config mergetool.writeToTemp true &&
600
test_config mergetool.myecho.cmd "echo \"\$LOCAL\"" &&