tests: use 'test_must_be_empty' instead of 'test ! -s'
[gitweb.git] / t / t7201-co.sh
index 76c223c9675cd1531ac078fa9e0c1f8cc4e09781..0e7d4421a73615e2906594f3bdea2ce9be323040 100755 (executable)
@@ -65,7 +65,7 @@ test_expect_success setup '
 test_expect_success "checkout from non-existing branch" '
 
        git checkout -b delete-me master &&
-       rm .git/refs/heads/delete-me &&
+       git update-ref -d --no-deref refs/heads/delete-me &&
        test refs/heads/delete-me = "$(git symbolic-ref HEAD)" &&
        git checkout master &&
        test refs/heads/master = "$(git symbolic-ref HEAD)"
@@ -139,7 +139,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
 
 '
 
@@ -163,7 +163,7 @@ test_expect_success 'checkout -m with merge conflict' '
        fill d2 aT d7 aS >expect &&
        test_cmp current expect &&
        git diff --cached two >current &&
-       ! test -s current
+       test_must_be_empty current
 '
 
 test_expect_success 'format of merge conflict from checkout -m' '