Browse Source

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>
maint
Luke Shumaker 4 years ago committed by Junio C Hamano
parent
commit
b269976979
  1. 7
      contrib/subtree/t/t7900-subtree.sh

7
contrib/subtree/t/t7900-subtree.sh

@ -37,6 +37,13 @@ last_commit_subject () { @@ -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'
#

Loading…
Cancel
Save