Code

t9801: do not overuse test_must_fail
authorJunio C Hamano <gitster@pobox.com>
Thu, 26 Jan 2012 19:40:09 +0000 (11:40 -0800)
committerJunio C Hamano <gitster@pobox.com>
Thu, 26 Jan 2012 19:40:09 +0000 (11:40 -0800)
commite7d7a56796c457b0a96e58e7638950db824b52af
tree891c2c9d425ab9e6c2833ba8afdeb9d876c8c3d8
parent3558f32f1f5fdb3d566e39f6e07cd3f97d124da6
t9801: do not overuse test_must_fail

test_must_fail is to make sure a program we can potentially break during
the course of updating git itself exits with a non-zero status in a clean
and controlled way.

When we expect a non-zero exit status from the commands we use from the
underlying platform in tests, e.g. making sure a string "error: " does not
appear in the output by running "grep 'error: '", just use "! grep" for
readability. It is not like we will try to update Git and suddenly 'grep'
we use from the system starts segfaulting.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t9801-git-p4-branch.sh