Skip to content

Commit b269976

Browse files
LukeShugitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent db6952b commit b269976

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

contrib/subtree/t/t7900-subtree.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,13 @@ last_commit_subject () {
3737
git log --pretty=format:%s -1
3838
}
3939

40+
test_expect_success 'shows short help text for -h' '
41+
test_expect_code 129 git subtree -h >out 2>err &&
42+
test_must_be_empty err &&
43+
grep -e "^ *or: git subtree pull" out &&
44+
grep -e --annotate out
45+
'
46+
4047
#
4148
# Tests for 'git subtree add'
4249
#

0 commit comments

Comments
 (0)