From 3e70ecba72a43a06ce64cdec2396e663a62b22bc Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Wed, 20 Sep 2006 13:20:49 +0200 Subject: [PATCH] prepare more tests for lacking symlinks --- t/t2001-checkout-cache-clash.sh | 2 ++ t/t2003-checkout-cache-mkdir.sh | 4 ++++ t/t2004-checkout-cache-temp.sh | 2 ++ t/t2100-update-cache-badpath.sh | 2 ++ t/t3000-ls-files-others.sh | 1 + 5 files changed, 11 insertions(+) diff --git a/t/t2001-checkout-cache-clash.sh b/t/t2001-checkout-cache-clash.sh index 0dcab8f1de..825119b01c 100755 --- a/t/t2001-checkout-cache-clash.sh +++ b/t/t2001-checkout-cache-clash.sh @@ -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)' diff --git a/t/t2003-checkout-cache-mkdir.sh b/t/t2003-checkout-cache-mkdir.sh index f9bc90aee4..6aa00f8edb 100755 --- a/t/t2003-checkout-cache-mkdir.sh +++ b/t/t2003-checkout-cache-mkdir.sh @@ -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 diff --git a/t/t2004-checkout-cache-temp.sh b/t/t2004-checkout-cache-temp.sh index c100959cad..1bf63d37e7 100755 --- a/t/t2004-checkout-cache-temp.sh +++ b/t/t2004-checkout-cache-temp.sh @@ -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 diff --git a/t/t2100-update-cache-badpath.sh b/t/t2100-update-cache-badpath.sh index 5bc0a3bed3..cc3bd9f775 100755 --- a/t/t2100-update-cache-badpath.sh +++ b/t/t2100-update-cache-badpath.sh @@ -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 diff --git a/t/t3000-ls-files-others.sh b/t/t3000-ls-files-others.sh index adcbe03d56..b470eb46be 100755 --- a/t/t3000-ls-files-others.sh +++ b/t/t3000-ls-files-others.sh @@ -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