Re: [PATCH 06/15] apply tests: use "test_must_fail" instead of ad-hoc pattern
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Mar 2, 2022, 23:09 UTC
- Message-ID
- <xmqqfso0gddv.fsf@gitster.g>
- In-Reply-To
- <patch-06.15-7952ae1f3b5-20220302T171755Z-avarab@gmail.com>
Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
Show 18 quoted lines
> test_expect_success 'apply should fail gracefully' ' > - > - if git apply --index patch > - then > - echo Oops, should not have succeeded > - false > - else > - status=$? && > - echo "Status was $status" && > - if test -f .git/index.lock > - then > - echo Oops, should not have crashed > - false > - fi > - fi > + test_must_fail git apply --index patch && > + test_path_is_missing .git/index.lock > '
Wow, that is very old fashioned. Thanks for cleaning up the leftover mess from the days before test_must_fail was prevalent.