Merge branch 'sb/atomic-push'
[gitweb.git] / t / t6034-merge-rename-nocruft.sh
index 65be95fbaaef4861189a7fc6b3a25bb6d7feb0a7..89871aa5b0447e1b15dedc6ac5e48f5ade20412c 100755 (executable)
@@ -73,33 +73,12 @@ test_expect_success 'merge white into red (A->B,M->N)' \
 '
        git checkout -b red-white red &&
        git merge white &&
-       git write-tree >/dev/null || {
-               echo "BAD: merge did not complete"
-               return 1
-       }
-
-       test -f B || {
-               echo "BAD: B does not exist in working directory"
-               return 1
-       }
-       test -f N || {
-               echo "BAD: N does not exist in working directory"
-               return 1
-       }
-       test -f R || {
-               echo "BAD: R does not exist in working directory"
-               return 1
-       }
-
-       test -f A && {
-               echo "BAD: A still exists in working directory"
-               return 1
-       }
-       test -f M && {
-               echo "BAD: M still exists in working directory"
-               return 1
-       }
-       return 0
+       git write-tree &&
+       test_path_is_file B &&
+       test_path_is_file N &&
+       test_path_is_file R &&
+       test_path_is_missing A &&
+       test_path_is_missing M
 '
 
 # This test broke in 8371234ecaaf6e14fe3f2082a855eff1bbd79ae9
@@ -108,32 +87,13 @@ test_expect_success 'merge blue into white (A->B, mod A, A untracked)' \
        git checkout -b white-blue white &&
        echo dirty >A &&
        git merge blue &&
-       git write-tree >/dev/null || {
-               echo "BAD: merge did not complete"
-               return 1
-       }
-
-       test -f A || {
-               echo "BAD: A does not exist in working directory"
-               return 1
-       }
-       test `cat A` = dirty || {
-               echo "BAD: A content is wrong"
-               return 1
-       }
-       test -f B || {
-               echo "BAD: B does not exist in working directory"
-               return 1
-       }
-       test -f N || {
-               echo "BAD: N does not exist in working directory"
-               return 1
-       }
-       test -f M && {
-               echo "BAD: M still exists in working directory"
-               return 1
-       }
-       return 0
+       git write-tree &&
+       test_path_is_file A &&
+       echo dirty >expect &&
+       test_cmp expect A &&
+       test_path_is_file B &&
+       test_path_is_file N &&
+       test_path_is_missing M
 '
 
 test_done