Re: [PATCHv3 5/5] t7406: fix call that was failing for the wrong reason
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Aug 7, 2018, 17:37 UTC
- Message-ID
- <xmqqftzqkri0.fsf@gitster-ct.c.googlers.com>
- In-Reply-To
- <20180807164905.3859-6-newren@gmail.com>
Elijah Newren <newren@gmail.com> writes:
Show 5 quoted lines
> A test making use of test_must_fail was failing like this: > fatal: ambiguous argument '|': unknown revision or path not in the working tree. > when the intent was to verify that a specific string was not found > in the output of the git diff command, i.e. that grep returned > non-zero. Fix the test to do that.
Nice. All other patches and the final shape of this script look sensible.
Thanks.
Show 20 quoted lines
> > Signed-off-by: Elijah Newren <newren@gmail.com> > --- > t/t7406-submodule-update.sh | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/t/t7406-submodule-update.sh b/t/t7406-submodule-update.sh > index 5b42bbe9fa..7dd1c86b02 100755 > --- a/t/t7406-submodule-update.sh > +++ b/t/t7406-submodule-update.sh > @@ -603,7 +603,8 @@ test_expect_success 'submodule update - update=none in .git/config but --checkou > git diff --name-only >out && > grep submodule out && > git submodule update --checkout && > - test_must_fail git diff --name-only \| grep submodule && > + git diff --name-only >out && > + ! grep submodule out && > (cd submodule && > ! compare_head > ) &&