Skip to content

Commit 222feaf

Browse files
committed
t7800: run both builtin and scripted difftool, for now
This is uglier than a simple touch "$GIT_EXEC_PATH/use-builtin-difftool" of course. But oh well. Signed-off-by: Johannes Schindelin <[email protected]>
1 parent 6d2957e commit 222feaf

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

t/t7800-difftool.sh

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,20 @@ prompt_given ()
2323
test "$prompt" = "Launch 'test-tool' [Y/n]? branch"
2424
}
2525

26+
for use_builtin_difftool in false true
27+
do
28+
29+
test_expect_success 'verify we are running the correct difftool' '
30+
if test true = '$use_builtin_difftool'
31+
then
32+
test_must_fail ok=129 git difftool -h >help &&
33+
grep "g, --gui" help
34+
else
35+
git difftool -h >help &&
36+
grep "g|--gui" help
37+
fi
38+
'
39+
2640
# NEEDSWORK: lose all the PERL prereqs once legacy-difftool is retired.
2741

2842
# Create a file on master and change it on branch
@@ -568,4 +582,17 @@ test_expect_success PERL,SYMLINKS 'difftool --dir-diff symlinked directories' '
568582
)
569583
'
570584

585+
test true != $use_builtin_difftool || break
586+
587+
test_expect_success 'tear down for re-run' '
588+
rm -rf * .[a-z]* &&
589+
git init
590+
'
591+
592+
# run as builtin difftool now
593+
GIT_CONFIG_PARAMETERS="'difftool.usebuiltin=true'"
594+
export GIT_CONFIG_PARAMETERS
595+
596+
done
597+
571598
test_done

0 commit comments

Comments
 (0)