diff options
author | Pranit Bauva <pranit.bauva@gmail.com> | 2017-01-03 22:57:07 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-01-08 00:20:01 +0300 |
commit | c7cf956618c4af9f3151a90d7552b05767e6444f (patch) | |
tree | ea074b87fcb872c13df8b0b5d2c3d2b12c5a89d6 /t/t9813-git-p4-preserve-users.sh | |
parent | a274e0a036ea886a31f8b216564ab1b4a3142f6c (diff) |
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>
Diffstat (limited to 't/t9813-git-p4-preserve-users.sh')
-rwxr-xr-x | t/t9813-git-p4-preserve-users.sh | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/t/t9813-git-p4-preserve-users.sh b/t/t9813-git-p4-preserve-users.sh index 0fe2312807..76004a5ad6 100755 --- a/t/t9813-git-p4-preserve-users.sh +++ b/t/t9813-git-p4-preserve-users.sh @@ -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 ) |