Skip to content

Commit c578a09

Browse files
megabreitgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 2ff7dff commit c578a09

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

t/t7610-mergetool.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,12 @@ test_expect_success 'filenames seen by tools start with ./' '
589589
git reset --hard master >/dev/null 2>&1
590590
'
591591

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' '
593598
git checkout -b test16 branch1 &&
594599
test_config mergetool.writeToTemp true &&
595600
test_config mergetool.myecho.cmd "echo \"\$LOCAL\"" &&

0 commit comments

Comments
 (0)