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:

committed by
Junio C Hamano

parent
a274e0a036
commit
c7cf956618
@ -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
|
||||
)
|
||||
|
Reference in New Issue
Block a user