summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 3558f32)
raw | patch | inline | side by side (parent: 3558f32)
author | Junio C Hamano <gitster@pobox.com> | |
Thu, 26 Jan 2012 19:40:09 +0000 (11:40 -0800) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Thu, 26 Jan 2012 19:40:09 +0000 (11:40 -0800) |
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>
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 | patch | blob | history |
index 6ff713b1f709df5f17ddb4e054997f298cd6cddd..d41470541650590355bf0de1a1b556b3502492b5 100755 (executable)
--- a/t/t9801-git-p4-branch.sh
+++ b/t/t9801-git-p4-branch.sh
test -f file1 &&
test -f file2 &&
test ! -f file3 &&
- test_must_fail grep update file2 &&
+ ! grep update file2 &&
git reset --hard p4/depot/branch3 &&
test -f file1 &&
test -f file2 &&
test_path_is_file file1 &&
test_path_is_file file2 &&
test_path_is_missing file3 &&
- test_must_fail grep update file2 &&
+ ! grep update file2 &&
git reset --hard p4/depot/branch3 &&
test_path_is_file file1 &&
test_path_is_file file2 &&
test_path_is_file file1 &&
test_path_is_file file2 &&
test_path_is_missing file3 &&
- test_must_fail grep update file2 &&
+ ! grep update file2 &&
git reset --hard p4/depot/branch5 &&
test_path_is_file file1 &&
test_path_is_file file2 &&
test_path_is_file file3 &&
- test_must_fail grep update file2 &&
+ ! grep update file2 &&
test_path_is_missing .git/git-p4-tmp
)
'