aboutsummaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-02-10 12:52:25 -0800
committerJunio C Hamano <gitster@pobox.com>2017-02-10 12:52:25 -0800
commit163d24dc4d914191d1981ed0d9fa2a5d91b7d412 (patch)
tree99efdce4c601aeca8dbeea4779a39e651c3b46fd /t
parentcf36a4dc3589da2df8ab2101b5c385f12abcd67d (diff)
parente66adcadfe63508dfd7410c2253116043894d298 (diff)
downloadgit-163d24dc4d914191d1981ed0d9fa2a5d91b7d412.tar.gz
git-163d24dc4d914191d1981ed0d9fa2a5d91b7d412.tar.xz
Merge branch 'js/difftool-builtin'
A few hot-fixes to C-rewrite of "git difftool". * js/difftool-builtin: t7800: simplify basic usage test difftool: fix bug when printing usage
Diffstat (limited to 't')
-rwxr-xr-xt/t7800-difftool.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/t/t7800-difftool.sh b/t/t7800-difftool.sh
index aa0ef0259..97bae54d8 100755
--- a/t/t7800-difftool.sh
+++ b/t/t7800-difftool.sh
@@ -23,6 +23,18 @@ prompt_given ()
test "$prompt" = "Launch 'test-tool' [Y/n]? branch"
}
+test_expect_success 'basic usage requires no repo' '
+ test_expect_code 129 git difftool -h >output &&
+ grep ^usage: output &&
+ # create a ceiling directory to prevent Git from finding a repo
+ mkdir -p not/repo &&
+ test_when_finished rm -r not &&
+ test_expect_code 129 \
+ env GIT_CEILING_DIRECTORIES="$(pwd)/not" \
+ git -C not/repo difftool -h >output &&
+ grep ^usage: output
+'
+
# Create a file on master and change it on branch
test_expect_success 'setup' '
echo master >file &&