summaryrefslogtreecommitdiff
path: root/t/t7800-difftool.sh
diff options
context:
space:
mode:
authorDavid Aguilar <davvid@gmail.com>2012-03-17 03:54:37 (GMT)
committerJunio C Hamano <gitster@pobox.com>2012-03-19 16:41:34 (GMT)
commitd50b2c73b6ffcdc9a55efa38542d02773df44407 (patch)
tree6a37211b0ea168a953dfc2cf021b600a9f56ba1e /t/t7800-difftool.sh
parentf524129737d9ba3e685c31bacde844ec1db1fea9 (diff)
downloadgit-d50b2c73b6ffcdc9a55efa38542d02773df44407.zip
git-d50b2c73b6ffcdc9a55efa38542d02773df44407.tar.gz
git-d50b2c73b6ffcdc9a55efa38542d02773df44407.tar.bz2
t7800: Test difftool passing arguments to diff
git-difftool relies on the ability to forward unknown arguments to the git-diff command. Add a test to ensure that this works as advertised. Signed-off-by: David Aguilar <davvid@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t7800-difftool.sh')
-rwxr-xr-xt/t7800-difftool.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/t/t7800-difftool.sh b/t/t7800-difftool.sh
index 4fb4c93..2763d79 100755
--- a/t/t7800-difftool.sh
+++ b/t/t7800-difftool.sh
@@ -83,6 +83,17 @@ test_expect_success PERL 'difftool ignores bad --tool values' '
test "$diff" = ""
'
+test_expect_success PERL 'difftool forwards arguments to diff' '
+ >for-diff &&
+ git add for-diff &&
+ echo changes>for-diff &&
+ git add for-diff &&
+ diff=$(git difftool --cached --no-prompt -- for-diff) &&
+ test "$diff" = "" &&
+ git reset -- for-diff &&
+ rm for-diff
+'
+
test_expect_success PERL 'difftool honors --gui' '
git config merge.tool bogus-tool &&
git config diff.tool bogus-tool &&