Re: [PATCH v3 10/30] subtree: t7900: add a test for the -h flag
- From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
- Date
- Apr 30, 2021, 10:01 UTC
- Message-ID
- <87lf90xf83.fsf@evledraar.gmail.com>
- In-Reply-To
- <20210427211748.2607474-11-lukeshu@lukeshu.com>
On Tue, Apr 27 2021, Luke Shumaker wrote:
Show 22 quoted lines
> From: Luke Shumaker <lukeshu@datawire.io>
>
> It's a dumb test, but it's surprisingly easy to break.
>
> Signed-off-by: Luke Shumaker <lukeshu@datawire.io>
> ---
> contrib/subtree/t/t7900-subtree.sh | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> 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 outI wonder if "grep -e --could-be-an-option-if-not-for-e" is portable, probably....