Skip to content

Commit 67a64ee

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 5add67c commit 67a64ee

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
@@ -606,4 +620,17 @@ test_expect_success PERL,SYMLINKS 'difftool --dir-diff symlinked directories' '
606620
)
607621
'
608622

623+
test true != $use_builtin_difftool || break
624+
625+
test_expect_success 'tear down for re-run' '
626+
rm -rf * .[a-z]* &&
627+
git init
628+
'
629+
630+
# run as builtin difftool now
631+
GIT_CONFIG_PARAMETERS="'difftool.usebuiltin=true'"
632+
export GIT_CONFIG_PARAMETERS
633+
634+
done
635+
609636
test_done

0 commit comments

Comments
 (0)