From d50b2c73b6ffcdc9a55efa38542d02773df44407 Mon Sep 17 00:00:00 2001 From: David Aguilar Date: Fri, 16 Mar 2012 20:54:37 -0700 Subject: [PATCH] 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 Signed-off-by: Junio C Hamano --- t/t7800-difftool.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/t/t7800-difftool.sh b/t/t7800-difftool.sh index 4fb4c9384..2763d795f 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 && -- 2.26.2