prepare more tests for lacking symlinks

This commit is contained in:
Johannes Schindelin
2006-09-20 13:20:49 +02:00
committed by Johannes Sixt
parent cb0ad0c0af
commit 3e70ecba72
5 changed files with 11 additions and 0 deletions

View File

@@ -59,10 +59,12 @@ test_expect_success \
'git-read-tree -m $tree1 && git-checkout-index -f -a'
test_debug 'show_files $tree1'
test "$no_symlinks" || {
ln -s path0 path1
test_expect_success \
'git-update-index --add a symlink.' \
'git-update-index --add path1'
}
test_expect_success \
'writing tree out with git-write-tree' \
'tree3=$(git-write-tree)'

View File

@@ -19,6 +19,7 @@ test_expect_success \
echo rezrov >path1/file1 &&
git-update-index --add path0 path1/file1'
test "$no_symlinks" || {
test_expect_success \
'have symlink in place where dir is expected.' \
'rm -fr path0 path1 &&
@@ -27,6 +28,7 @@ test_expect_success \
git-checkout-index -f -a &&
test ! -h path1 && test -d path1 &&
test -f path1/file1 && test ! -f path2/file1'
}
test_expect_success \
'use --prefix=path2/' \
@@ -58,6 +60,7 @@ test_expect_success \
test ! -f path0 &&
test ! -f path1/file1'
test "$no_symlinks" || {
# Linus fix #1
test_expect_success \
'use --prefix=tmp/orary/ where tmp is a symlink' \
@@ -92,5 +95,6 @@ test_expect_success \
test ! -h tmp-path1 &&
test -d tmp-path1 &&
test -f tmp-path1/file1'
}
test_done

View File

@@ -194,6 +194,7 @@ test_expect_success \
test $(cat ../$s1) = tree1asubdir/path5)
)'
test "$no_symlinks" || {
test_expect_success \
'checkout --temp symlink' '
rm -f path* .merge_* out .git/index &&
@@ -208,5 +209,6 @@ test $(cut "-d " -f2 out) = a &&
p=$(cut "-d " -f1 out) &&
test -f $p &&
test $(cat $p) = b'
}
test_done

View File

@@ -29,6 +29,7 @@ date >path0
ln -s xyzzy path1
date >path2/file2
date >path3/file3
test "$no_symlinks" && date > path1
test_expect_success \
'git-update-index --add to add various paths.' \
@@ -41,6 +42,7 @@ date >path2
ln -s frotz path3
date >path0/file0
date >path1/file1
test "$no_symlinks" && date > path3
for p in path0/file0 path1/file1 path2 path3
do

View File

@@ -18,6 +18,7 @@ filesystem.
date >path0
ln -s xyzzy path1
test "$no_symlinks" && date > path1
mkdir path2 path3
date >path2/file2
date >path2-junk