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>
Luke Shumaker committed
Apr 27, 2021 at 15:17 UTC
b2699769792cfd56f77dfd6819d6654628176634
1 file changed
+7
contrib/subtree/t/t7900-subtree.sh
+7
@@ -37,6 +37,13 @@ last_commit_subject () {
37
git log --pretty=format:%s -1
38
}
39
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
+
47
#
48
# Tests for 'git subtree add'
49
#