Merge branch 'js/rebase-p-tests'
[gitweb.git] / t / t7201-co.sh
index 94cb039a03f8378cec55f61a9694feca4a973d29..826987ca804fbd74bc06467446c99b7b4a27ea3e 100755 (executable)
@@ -116,9 +116,8 @@ test_expect_success "checkout -m with dirty tree" '
        git diff --name-status side >current.side &&
        test_cmp expect.side current.side &&
 
-       : >expect.index &&
        git diff --cached >current.index &&
-       test_cmp expect.index current.index
+       test_must_be_empty current.index
 '
 
 test_expect_success "checkout -m with dirty tree, renamed" '
@@ -139,7 +138,7 @@ test_expect_success "checkout -m with dirty tree, renamed" '
        test_cmp expect uno &&
        ! test -f one &&
        git diff --cached >current &&
-       ! test -s current
+       test_must_be_empty current
 
 '
 
@@ -161,9 +160,9 @@ test_expect_success 'checkout -m with merge conflict' '
        git diff master:one :3:uno |
        sed -e "1,/^@@/d" -e "/^ /d" -e "s/^-/d/" -e "s/^+/a/" >current &&
        fill d2 aT d7 aS >expect &&
-       test_cmp current expect &&
+       test_cmp expect current &&
        git diff --cached two >current &&
-       ! test -s current
+       test_must_be_empty current
 '
 
 test_expect_success 'format of merge conflict from checkout -m' '
@@ -175,7 +174,7 @@ test_expect_success 'format of merge conflict from checkout -m' '
 
        git ls-files >current &&
        fill same two two two >expect &&
-       test_cmp current expect &&
+       test_cmp expect current &&
 
        cat <<-EOF >expect &&
        <<<<<<< simple