summaryrefslogtreecommitdiff
path: root/t/t7800-difftool.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/t7800-difftool.sh')
-rwxr-xr-xt/t7800-difftool.sh19
1 files changed, 18 insertions, 1 deletions
diff --git a/t/t7800-difftool.sh b/t/t7800-difftool.sh
index eca51a8..8ee186a 100755
--- a/t/t7800-difftool.sh
+++ b/t/t7800-difftool.sh
@@ -214,7 +214,24 @@ test_expect_success 'difftool.<tool>.path' '
diff=$(git difftool --tool=tkdiff --no-prompt branch) &&
git config --unset difftool.tkdiff.path &&
lines=$(echo "$diff" | grep file | wc -l) &&
- test "$lines" -eq 1
+ test "$lines" -eq 1 &&
+
+ restore_test_defaults
+'
+
+test_expect_success 'difftool --extcmd=...' '
+ diff=$(git difftool --no-prompt --extcmd=cat branch) &&
+
+ lines=$(echo "$diff" | wc -l) &&
+ test "$lines" -eq 2 &&
+
+ lines=$(echo "$diff" | grep master | wc -l) &&
+ test "$lines" -eq 1 &&
+
+ lines=$(echo "$diff" | grep branch | wc -l) &&
+ test "$lines" -eq 1 &&
+
+ restore_test_defaults
'
test_done