[PATCHv3 04/16] t4002 (diff-basic): use test_might_fail for commands that might fail
- From
Elijah Newren <newren@gmail.com>
- Date
- Sep 25, 2010, 19:06 UTC
- Message-ID
- <1285441627-28233-5-git-send-email-newren@gmail.com>
- In-Reply-To
- <1285441627-28233-1-git-send-email-newren@gmail.com>
Also replace '|| return 1' by '&&' to allow chain of operations to be checked for proper return status.
Signed-off-by: Elijah Newren <newren@gmail.com> --- t/t4002-diff-basic.sh | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/t/t4002-diff-basic.sh b/t/t4002-diff-basic.sh index 73441a5..340aa7d 100755 --- a/t/t4002-diff-basic.sh +++ b/t/t4002-diff-basic.sh @@ -205,8 +205,8 @@ test_expect_success \ 'rm -fr Z [A-Z][A-Z] && git read-tree $tree_A && git checkout-index -f -a && - git read-tree --reset $tree_O || return 1 - git update-index --refresh >/dev/null ;# this can exit non-zero + git read-tree --reset $tree_O && + test_might_fail git update-index --refresh >/dev/null && git diff-files >.test-a && cmp_diff_files_output .test-a .test-recursive-OA' @@ -215,8 +215,8 @@ test_expect_success \ 'rm -fr Z [A-Z][A-Z] && git read-tree $tree_B && git checkout-index -f -a && - git read-tree --reset $tree_O || return 1 - git update-index --refresh >/dev/null ;# this can exit non-zero + git read-tree --reset $tree_O && + test_might_fail git update-index --refresh >/dev/null && git diff-files >.test-a && cmp_diff_files_output .test-a .test-recursive-OB' @@ -225,8 +225,8 @@ test_expect_success \ 'rm -fr Z [A-Z][A-Z] && git read-tree $tree_B && git checkout-index -f -a && - git read-tree --reset $tree_A || return 1 - git update-index --refresh >/dev/null ;# this can exit non-zero + git read-tree --reset $tree_A && + test_might_fail git update-index --refresh >/dev/null && git diff-files >.test-a && cmp_diff_files_output .test-a .test-recursive-AB'
-- 1.7.3.95.g14291