summaryrefslogtreecommitdiff
path: root/t/t3010-ls-files-killed-modified.sh
diff options
context:
space:
mode:
authorJohannes Sixt <j6t@kdbg.org>2013-06-07 22:53:28 +0200
committerJunio C Hamano <gitster@pobox.com>2013-06-07 15:01:45 -0700
commit889c6f0e4d637223e0517d000eedad39b173d8a2 (patch)
treed21550794a99df816ecc0a580d14545ee5c12acf /t/t3010-ls-files-killed-modified.sh
parent9ce415d972a04df4bfceaad0fab8eaea9a66997e (diff)
downloadgit-889c6f0e4d637223e0517d000eedad39b173d8a2.tar.gz
tests: use test_ln_s_add to remove SYMLINKS prerequisite (trivial cases)
There are many instances where the treatment of symbolic links in the object model and the algorithms are tested, but where it is not necessary to actually have a symbolic link in the worktree. Make adjustments to the tests and remove the SYMLINKS prerequisite when appropriate in trivial cases, where "trivial" means: - merely a replacement of 'ln -s a b && git add b' by test_ln_s_add is needed; - a test for symbolic link on the file system can be split off (and remains protected by SYMLINKS); - existing code is equivalent to test_ln_s_add. Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t3010-ls-files-killed-modified.sh')
-rwxr-xr-xt/t3010-ls-files-killed-modified.sh9
1 files changed, 2 insertions, 7 deletions
diff --git a/t/t3010-ls-files-killed-modified.sh b/t/t3010-ls-files-killed-modified.sh
index 2d0ff2d5a1..262e617445 100755
--- a/t/t3010-ls-files-killed-modified.sh
+++ b/t/t3010-ls-files-killed-modified.sh
@@ -39,12 +39,7 @@ modified without reporting path9 and path10.
test_expect_success 'git update-index --add to add various paths.' '
date >path0 &&
- if test_have_prereq SYMLINKS
- then
- ln -s xyzzy path1
- else
- date > path1
- fi &&
+ test_ln_s_add xyzzy path1 &&
mkdir path2 path3 &&
date >path2/file2 &&
date >path3/file3 &&
@@ -52,7 +47,7 @@ test_expect_success 'git update-index --add to add various paths.' '
date >path8 &&
: >path9 &&
date >path10 &&
- git update-index --add -- path0 path1 path?/file? path7 path8 path9 path10 &&
+ git update-index --add -- path0 path?/file? path7 path8 path9 path10 &&
rm -fr path? # leave path10 alone
'