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>
David Aguilar committed
Mar 16, 2012 at 20:54 UTC
d50b2c73b6ffcdc9a55efa38542d02773df44407
1 file changed
+11
t/t7800-difftool.sh
+11
@@ -83,6 +83,17 @@ test_expect_success PERL 'difftool ignores bad --tool values' '
83
test "$diff" = ""
84
'
85
86
+test_expect_success PERL 'difftool forwards arguments to diff' '
87
+ >for-diff &&
88
+ git add for-diff &&
89
+ echo changes>for-diff &&
90
+ git add for-diff &&
91
+ diff=$(git difftool --cached --no-prompt -- for-diff) &&
92
+ test "$diff" = "" &&
93
+ git reset -- for-diff &&
94
+ rm for-diff
95
+'
96
+
97
test_expect_success PERL 'difftool honors --gui' '
98
git config merge.tool bogus-tool &&
99
git config diff.tool bogus-tool &&