diff options
author | Pranit Bauva <pranit.bauva@gmail.com> | 2017-01-04 01:27:07 +0530 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-01-07 13:20:01 -0800 |
commit | c7cf956618c4af9f3151a90d7552b05767e6444f (patch) | |
tree | ea074b87fcb872c13df8b0b5d2c3d2b12c5a89d6 /t/t9813-git-p4-preserve-users.sh | |
parent | Sync with maint-2.10 (diff) | |
download | tgif-c7cf956618c4af9f3151a90d7552b05767e6444f.tar.xz |
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 ) |