git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] t7800-difftool: Set a bogus tool for use by tests
@ 2009-12-23  5:27 David Aguilar
  2009-12-23  5:27 ` [RFC PATCH 2/2] git-difftool: Add '--gui' for selecting a GUI tool David Aguilar
  0 siblings, 1 reply; 2+ messages in thread
From: David Aguilar @ 2009-12-23  5:27 UTC (permalink / raw)
  To: git; +Cc: gitster

If a difftool test has an error then running the git test suite
may end up invoking a GUI diff tool.  We now guard against this
by setting a difftool.bogus-tool.cmd variable.

The tests already used --tool=bogus-tool in various places so
this is simply ensuring that nothing ever falls back and
finds a real diff tool.

Signed-off-by: David Aguilar <davvid@gmail.com>
---
 t/t7800-difftool.sh |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/t/t7800-difftool.sh b/t/t7800-difftool.sh
index fff6a6d..707a0f5 100755
--- a/t/t7800-difftool.sh
+++ b/t/t7800-difftool.sh
@@ -36,6 +36,7 @@ restore_test_defaults()
 	unset GIT_DIFFTOOL_NO_PROMPT
 	git config diff.tool test-tool &&
 	git config difftool.test-tool.cmd 'cat $LOCAL'
+	git config difftool.bogus-tool.cmd false
 }
 
 prompt_given()
@@ -71,7 +72,7 @@ test_expect_success 'custom commands' '
 
 # Ensures that git-difftool ignores bogus --tool values
 test_expect_success 'difftool ignores bad --tool values' '
-	diff=$(git difftool --no-prompt --tool=bogus-tool branch)
+	diff=$(git difftool --no-prompt --tool=bad-tool branch)
 	test "$?" = 1 &&
 	test "$diff" = ""
 '
-- 
1.6.2.5

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-12-23  5:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-23  5:27 [PATCH 1/2] t7800-difftool: Set a bogus tool for use by tests David Aguilar
2009-12-23  5:27 ` [RFC PATCH 2/2] git-difftool: Add '--gui' for selecting a GUI tool David Aguilar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).