diff options
Diffstat (limited to 't/t7800-difftool.sh')
-rwxr-xr-x | t/t7800-difftool.sh | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/t/t7800-difftool.sh b/t/t7800-difftool.sh index aa0ef02597..97bae54d83 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 && |