[PATCHv4 04/15] t4002 (diff-basic): use test_might_fail for commands that might fail
From: Elijah Newren <hidden>
Date: 2016-06-15 22:49:37
Subsystem:
the rest · Maintainer:
Linus Torvalds
Also replace '|| return 1' by '&&' to allow chain of operations to be checked for proper return status. Acked-by: Ævar Arnfjörð Bjarmason <redacted> Signed-off-by: Elijah Newren <redacted> --- 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