Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElijah Newren <newren@gmail.com>2010-10-04 00:00:03 +0400
committerJunio C Hamano <gitster@pobox.com>2010-10-07 00:26:11 +0400
commitb62b3436ffa6acc27a431f29fb25aa08eb441940 (patch)
treee7a829724ba4f2803f5a9b369d4f76a2effaa925 /t/t4002-diff-basic.sh
parent315e76540baa8b2c1887ea1ee0827dcbcda3e267 (diff)
t4002 (diff-basic): use test_might_fail for commands that might fail
Also replace '|| return 1' by '&&' to allow chain of operations to be checked for proper return status, and modify the update-index command as suggested by Jonathan Nieder to not exit early but try to make sure files that match the work tree are marked as matching. Acked-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4002-diff-basic.sh')
-rwxr-xr-xt/t4002-diff-basic.sh12
1 files changed, 6 insertions, 6 deletions
diff --git a/t/t4002-diff-basic.sh b/t/t4002-diff-basic.sh
index 73441a5165..9fb8ca06a8 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_must_fail git update-index --refresh -q &&
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_must_fail git update-index --refresh -q &&
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_must_fail git update-index --refresh -q &&
git diff-files >.test-a &&
cmp_diff_files_output .test-a .test-recursive-AB'