summaryrefslogtreecommitdiff
path: root/contrib/subtree
diff options
context:
space:
mode:
authorLibravatar Luke Shumaker <lukeshu@datawire.io>2021-04-27 15:17:28 -0600
committerLibravatar Junio C Hamano <gitster@pobox.com>2021-04-28 16:47:17 +0900
commitb2699769792cfd56f77dfd6819d6654628176634 (patch)
tree47f95867bbcad1c29a489646989e86000011fc5c /contrib/subtree
parentsubtree: t7900: rename last_commit_message to last_commit_subject (diff)
downloadtgif-b2699769792cfd56f77dfd6819d6654628176634.tar.xz
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 <lukeshu@datawire.io> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib/subtree')
-rwxr-xr-xcontrib/subtree/t/t7900-subtree.sh7
1 files changed, 7 insertions, 0 deletions
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'
#