Merge branch 'ft/diff-rename-default-score-is-half' into maint
[gitweb.git] / t / t7001-mv.sh
index a845b154e4db50b52eb67eaefefcc42403c52c0e..101816e718d6149a0e8ee500026455f04a8384ed 100755 (executable)
@@ -218,13 +218,13 @@ test_expect_success 'git mv should not change sha1 of moved cache entry' '
 
 rm -f dirty dirty2
 
-test_expect_success SYMLINKS 'git mv should overwrite symlink to a file' '
+test_expect_success 'git mv should overwrite symlink to a file' '
 
        rm -fr .git &&
        git init &&
        echo 1 >moved &&
-       ln -s moved symlink &&
-       git add moved symlink &&
+       test_ln_s_add moved symlink &&
+       git add moved &&
        test_must_fail git mv moved symlink &&
        git mv -f moved symlink &&
        ! test -e moved &&
@@ -237,22 +237,26 @@ test_expect_success SYMLINKS 'git mv should overwrite symlink to a file' '
 
 rm -f moved symlink
 
-test_expect_success SYMLINKS 'git mv should overwrite file with a symlink' '
+test_expect_success 'git mv should overwrite file with a symlink' '
 
        rm -fr .git &&
        git init &&
        echo 1 >moved &&
-       ln -s moved symlink &&
-       git add moved symlink &&
+       test_ln_s_add moved symlink &&
+       git add moved &&
        test_must_fail git mv symlink moved &&
        git mv -f symlink moved &&
        ! test -e symlink &&
-       test -h moved &&
        git update-index --refresh &&
        git diff-files --quiet
 
 '
 
+test_expect_success SYMLINKS 'check moved symlink' '
+
+       test -h moved
+'
+
 rm -f moved symlink
 
 test_done