diff options
author | Eric Sunshine <sunshine@sunshineco.com> | 2018-07-02 03:23:41 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-07-03 22:38:04 +0300 |
commit | 83279748594cf1c7a38ebf518cd6b63cd3d8de37 (patch) | |
tree | 72db4e9015b7facf2e653c3ab016efaadb5f3592 /t/t1700-split-index.sh | |
parent | e3331758f12da22f4103eec7efe1b5304a9be5e9 (diff) |
t: use test_might_fail() instead of manipulating exit code manually
These tests manually coerce the exit code of invoked commands to
"success" when they don't care if the command succeeds or fails since
failure of those commands should not cause the test to fail overall.
In doing so, they intentionally break the &&-chain. Modernize by
replacing manual exit code management with test_might_fail() and a
normal &&-chain.
Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t1700-split-index.sh')
-rwxr-xr-x | t/t1700-split-index.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/t/t1700-split-index.sh b/t/t1700-split-index.sh index 1e81b33b2e..39133bcbc8 100755 --- a/t/t1700-split-index.sh +++ b/t/t1700-split-index.sh @@ -435,7 +435,7 @@ test_expect_success 'writing split index with null sha1 does not write cache tre commit=$(git commit-tree $tree -p HEAD <msg) && git update-ref HEAD "$commit" && GIT_ALLOW_NULL_SHA1=1 git reset --hard && - (test-tool dump-cache-tree >cache-tree.out || true) && + test_might_fail test-tool dump-cache-tree >cache-tree.out && test_line_count = 0 cache-tree.out ' |