From: Luke Shumaker Date: Tue, 27 Apr 2021 21:17:28 +0000 (-0600) Subject: subtree: t7900: add a test for the -h flag X-Git-Tag: v2.32.0-rc0~30^2~20 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b2699769792cfd56f77dfd6819d6654628176634;p=thirdparty%2Fgit.git subtree: t7900: add a test for the -h flag It's a dumb test, but it's surprisingly easy to break. Signed-off-by: Luke Shumaker Signed-off-by: Junio C Hamano --- diff --git a/contrib/subtree/t/t7900-subtree.sh b/contrib/subtree/t/t7900-subtree.sh index 5c2510f1f5..9afba2f282 100755 --- a/contrib/subtree/t/t7900-subtree.sh +++ b/contrib/subtree/t/t7900-subtree.sh @@ -37,6 +37,13 @@ last_commit_subject () { git log --pretty=format:%s -1 } +test_expect_success 'shows short help text for -h' ' + test_expect_code 129 git subtree -h >out 2>err && + test_must_be_empty err && + grep -e "^ *or: git subtree pull" out && + grep -e --annotate out +' + # # Tests for 'git subtree add' #