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
@ -1004,7 +1004,7 @@ test_expect_success 'push --porcelain' '
|
||||
test_expect_success 'push --porcelain bad url' '
|
||||
mk_empty testrepo &&
|
||||
test_must_fail git push >.git/bar --porcelain asdfasdfasd refs/heads/master:refs/remotes/origin/master &&
|
||||
test_must_fail grep -q Done .git/bar
|
||||
! grep -q Done .git/bar
|
||||
'
|
||||
|
||||
test_expect_success 'push --porcelain rejected' '
|
||||
|
||||
Reference in New Issue
Block a user