[PATCH] t7800: Test difftool passing arguments to diff

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
---
 t/t7800-difftool.sh |   11 +++++++++++
 1 file changed, 11 insertions(+)

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 &&
-- 
1.7.10.rc1.22.gf5241.dirty

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]