don't use test_must_fail with grep

test_must_fail should only be used for testing git commands. To test the
failure of other commands use `!`.

Reported-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Pranit Bauva <pranit.bauva@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Pranit Bauva
2017-01-04 01:27:07 +05:30
committed by Junio C Hamano
parent a274e0a036
commit c7cf956618
10 changed files with 22 additions and 22 deletions

View File

@ -126,13 +126,13 @@ test_expect_success 'not preserving user with mixed authorship' '
grep "git author charlie@example.com does not match" &&
make_change_by_user usernamefile3 alice alice@example.com &&
git p4 commit |\
test_must_fail grep "git author.*does not match" &&
git p4 commit >actual &&
! grep "git author.*does not match" actual &&
git config git-p4.skipUserNameCheck true &&
make_change_by_user usernamefile3 Charlie charlie@example.com &&
git p4 commit |\
test_must_fail grep "git author.*does not match" &&
git p4 commit >actual &&
! grep "git author.*does not match" actual &&
p4_check_commit_author usernamefile3 alice
)