t6035: use test_ln_s_add to remove SYMLINKS prerequisite
All tests in t6035 are protected by SYMLINKS. But that is not necessary,
because a lot of the functionality can be tested provided symbolic link
entries enter the index and object data base. Use test_ln_s_add for this
purpose.
Some test cases do test the presence of symbolic links on the file system.
Move these tests into separate test cases that remain protected by
SYMLINKS.
There is one instance of expect_failure. There is a possibility that this
test case fails differently depending on whether SYMLINKS is present or
not; but this is not the case.
Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
maint
Johannes Sixt12 years agocommitted byJunio C Hamano
test_description='merging when a directory was replaced with a symlink'
. ./test-lib.sh
test_expect_success SYMLINKS 'create a commit where dir a/b changed to symlink' '
test_expect_success 'create a commit where dir a/b changed to symlink' '
mkdir -p a/b/c a/b-2/c &&
> a/b/c/d &&
> a/b-2/c/d &&
@ -12,12 +12,12 @@ test_expect_success SYMLINKS 'create a commit where dir a/b changed to symlink'
@@ -12,12 +12,12 @@ test_expect_success SYMLINKS 'create a commit where dir a/b changed to symlink'
git commit -m base &&
git tag start &&
rm -rf a/b &&
ln -s b-2 a/b &&
git add -A &&
test_ln_s_add b-2 a/b &&
git commit -m "dir to symlink"
'
test_expect_success SYMLINKS 'checkout does not clobber untracked symlink' '
test_expect_success 'checkout does not clobber untracked symlink' '
git checkout HEAD^0 &&
git reset --hard master &&
git rm --cached a/b &&
@ -25,7 +25,7 @@ test_expect_success SYMLINKS 'checkout does not clobber untracked symlink' '
@@ -25,7 +25,7 @@ test_expect_success SYMLINKS 'checkout does not clobber untracked symlink' '
test_must_fail git checkout start^0
'
test_expect_success SYMLINKS 'a/b-2/c/d is kept when clobbering symlink b' '
test_expect_success 'a/b-2/c/d is kept when clobbering symlink b' '
git checkout HEAD^0 &&
git reset --hard master &&
git rm --cached a/b &&
@ -34,14 +34,14 @@ test_expect_success SYMLINKS 'a/b-2/c/d is kept when clobbering symlink b' '
@@ -34,14 +34,14 @@ test_expect_success SYMLINKS 'a/b-2/c/d is kept when clobbering symlink b' '
test -f a/b-2/c/d
'
test_expect_success SYMLINKS 'checkout should not have deleted a/b-2/c/d' '
test_expect_success 'checkout should not have deleted a/b-2/c/d' '
git checkout HEAD^0 &&
git reset --hard master &&
git checkout start^0 &&
test -f a/b-2/c/d
'
test_expect_success SYMLINKS 'setup for merge test' '