Commit 78360b57 authored by Junio C Hamano's avatar Junio C Hamano

Merge branch 'js/windows-tests'

* js/windows-tests:
  t0060: fix whitespace in "wc -c" invocation
  t5503: GIT_DEBUG_SEND_PACK is not supported on MinGW
  t7004: Use prerequisite tags to skip tests that need gpg
  Use prerequisites to skip tests that need unzip
  t3700: Skip a test with backslashes in pathspec
  Skip tests that require a filesystem that obeys POSIX permissions
  t0060: Fix tests on Windows
  Use prerequisite tags to skip tests that depend on symbolic links
  t9100, t9129: Use prerequisite tags for UTF-8 tests
  t5302: Use prerequisite tags to skip 64-bit offset tests
  Skip tests that fail if the executable bit is not handled by the filesystem
  t3600: Use test prerequisite tags
  test-lib: Infrastructure to test and check for prerequisites
  t0050: Check whether git init detected symbolic link support correctly
  Tests on Windows: $(pwd) must return Windows-style paths
  test-lib: Work around missing sum on Windows
  test-lib: Work around incompatible sort and find on Windows

Conflicts:
	t/t3000-ls-files-others.sh
parents edbc25c5 28baf82e
......@@ -57,6 +57,21 @@ test_expect_failure 'pretend we have a known breakage' '
test_expect_failure 'pretend we have fixed a known breakage' '
:
'
test_set_prereq HAVEIT
haveit=no
test_expect_success HAVEIT 'test runs if prerequisite is satisfied' '
test_have_prereq HAVEIT &&
haveit=yes
'
donthaveit=yes
test_expect_success DONTHAVEIT 'unmet prerequisite causes test to be skipped' '
donthaveit=no
'
if test $haveit$donthaveit != yesyes
then
say "bug in test framework: prerequisite tags do not work reliably"
exit 1
fi
################################################################
# Basics of the basics
......@@ -100,12 +115,31 @@ test_expect_success \
'test "$tree" = 4b825dc642cb6eb9a060e54bf8d69288fbee4904'
# Various types of objects
# Some filesystems do not support symblic links; on such systems
# some expected values are different
mkdir path2 path3 path3/subp3
for p in path0 path2/file2 path3/file3 path3/subp3/file3
paths='path0 path2/file2 path3/file3 path3/subp3/file3'
for p in $paths
do
echo "hello $p" >$p
ln -s "hello $p" ${p}sym
done
if test_have_prereq SYMLINKS
then
for p in $paths
do
ln -s "hello $p" ${p}sym
done
expectfilter=cat
expectedtree=087704a96baf1c2d1c869a8b084481e121c88b5b
expectedptree1=21ae8269cacbe57ae09138dcc3a2887f904d02b3
expectedptree2=3c5e5399f3a333eddecce7a9b9465b63f65f51e2
else
expectfilter='grep -v sym'
expectedtree=8e18edf7d7edcf4371a3ac6ae5f07c2641db7c46
expectedptree1=cfb8591b2f65de8b8cc1020cd7d9e67e7793b325
expectedptree2=ce580448f0148b985a513b693fdf7d802cacb44f
fi
test_expect_success \
'adding various types of objects with git update-index --add.' \
'find path* ! -type d -print | xargs git update-index --add'
......@@ -115,7 +149,7 @@ test_expect_success \
'showing stage with git ls-files --stage' \
'git ls-files --stage >current'
cat >expected <<\EOF
$expectfilter >expected <<\EOF
100644 f87290f8eb2cbbea7857214459a0739927eab154 0 path0
120000 15a98433ae33114b085f3eb3bb03b832b3180a01 0 path0sym
100644 3feff949ed00a62d9f7af97c15cd8a30595e7ac7 0 path2/file2
......@@ -134,7 +168,7 @@ test_expect_success \
'tree=$(git write-tree)'
test_expect_success \
'validate object ID for a known tree.' \
'test "$tree" = 087704a96baf1c2d1c869a8b084481e121c88b5b'
'test "$tree" = "$expectedtree"'
test_expect_success \
'showing tree with git ls-tree' \
......@@ -145,7 +179,7 @@ cat >expected <<\EOF
040000 tree 58a09c23e2ca152193f2786e06986b7b6712bdbe path2
040000 tree 21ae8269cacbe57ae09138dcc3a2887f904d02b3 path3
EOF
test_expect_success \
test_expect_success SYMLINKS \
'git ls-tree output for a known tree.' \
'test_cmp expected current'
......@@ -154,7 +188,7 @@ test_expect_success \
test_expect_success \
'showing tree with git ls-tree -r' \
'git ls-tree -r $tree >current'
cat >expected <<\EOF
$expectfilter >expected <<\EOF
100644 blob f87290f8eb2cbbea7857214459a0739927eab154 path0
120000 blob 15a98433ae33114b085f3eb3bb03b832b3180a01 path0sym
100644 blob 3feff949ed00a62d9f7af97c15cd8a30595e7ac7 path2/file2
......@@ -185,7 +219,7 @@ cat >expected <<\EOF
100644 blob 00fb5908cb97c2564a9783c0c64087333b3b464f path3/subp3/file3
120000 blob 6649a1ebe9e9f1c553b66f5a6e74136a07ccc57c path3/subp3/file3sym
EOF
test_expect_success \
test_expect_success SYMLINKS \
'git ls-tree -r output for a known tree.' \
'test_cmp expected current'
......@@ -194,14 +228,14 @@ test_expect_success \
'ptree=$(git write-tree --prefix=path3)'
test_expect_success \
'validate object ID for a known tree.' \
'test "$ptree" = 21ae8269cacbe57ae09138dcc3a2887f904d02b3'
'test "$ptree" = "$expectedptree1"'
test_expect_success \
'writing partial tree out with git write-tree --prefix.' \
'ptree=$(git write-tree --prefix=path3/subp3)'
test_expect_success \
'validate object ID for a known tree.' \
'test "$ptree" = 3c5e5399f3a333eddecce7a9b9465b63f65f51e2'
'test "$ptree" = "$expectedptree2"'
cat >badobjects <<EOF
100644 blob 1000000000000000000000000000000000000000 dir/file1
......@@ -234,7 +268,7 @@ test_expect_success \
newtree=$(git write-tree) &&
test "$newtree" = "$tree"'
cat >expected <<\EOF
$expectfilter >expected <<\EOF
:100644 100644 f87290f8eb2cbbea7857214459a0739927eab154 0000000000000000000000000000000000000000 M path0
:120000 120000 15a98433ae33114b085f3eb3bb03b832b3180a01 0000000000000000000000000000000000000000 M path0sym
:100644 100644 3feff949ed00a62d9f7af97c15cd8a30595e7ac7 0000000000000000000000000000000000000000 M path2/file2
......@@ -257,7 +291,7 @@ test_expect_success \
'git diff-files >current && cmp -s current /dev/null'
################################################################
P=087704a96baf1c2d1c869a8b084481e121c88b5b
P=$expectedtree
test_expect_success \
'git commit-tree records the correct tree in a commit.' \
'commit0=$(echo NO | git commit-tree $P) &&
......@@ -293,7 +327,7 @@ test_expect_success 'update-index D/F conflict' '
test $numpath0 = 1
'
test_expect_success 'absolute path works as expected' '
test_expect_success SYMLINKS 'absolute path works as expected' '
mkdir first &&
ln -s ../.git first/.git &&
mkdir second &&
......
......@@ -15,7 +15,7 @@ test_expect_success setup '
'
test_expect_success 'write-tree should notice unwritable repository' '
test_expect_success POSIXPERM 'write-tree should notice unwritable repository' '
(
chmod a-w .git/objects .git/objects/?? &&
......@@ -27,7 +27,7 @@ test_expect_success 'write-tree should notice unwritable repository' '
'
test_expect_success 'commit should notice unwritable repository' '
test_expect_success POSIXPERM 'commit should notice unwritable repository' '
(
chmod a-w .git/objects .git/objects/?? &&
......@@ -39,7 +39,7 @@ test_expect_success 'commit should notice unwritable repository' '
'
test_expect_success 'update-index should notice unwritable repository' '
test_expect_success POSIXPERM 'update-index should notice unwritable repository' '
(
echo 6O >file &&
......@@ -52,7 +52,7 @@ test_expect_success 'update-index should notice unwritable repository' '
'
test_expect_success 'add should notice unwritable repository' '
test_expect_success POSIXPERM 'add should notice unwritable repository' '
(
echo b >file &&
......
......@@ -29,11 +29,11 @@ test_expect_success 'tar archive' '
"$UNZIP" -v >/dev/null 2>&1
if [ $? -eq 127 ]; then
say "Skipping ZIP test, because unzip was not found"
test_done
exit
else
test_set_prereq UNZIP
fi
test_expect_success 'zip archive' '
test_expect_success UNZIP 'zip archive' '
git archive --format=zip HEAD >test.zip &&
......
......@@ -9,7 +9,8 @@ aumlcdiar=`printf '\x61\xcc\x88'`
case_insensitive=
unibad=
test_expect_success 'see if we expect ' '
no_symlinks=
test_expect_success 'see what we expect' '
test_case=test_expect_success
test_unicode=test_expect_success
......@@ -31,13 +32,21 @@ test_expect_success 'see if we expect ' '
;;
*) ;;
esac &&
rm -fr junk
rm -fr junk &&
{
ln -s x y 2> /dev/null &&
test -h y 2> /dev/null ||
no_symlinks=1
rm -f y
}
'
test "$case_insensitive" &&
say "will test on a case insensitive filesystem"
test "$unibad" &&
say "will test on a unicode corrupting filesystem"
test "$no_symlinks" &&
say "will test on a filesystem lacking symbolic links"
if test "$case_insensitive"
then
......@@ -53,6 +62,21 @@ test_expect_success "detection of case insensitive filesystem during repo init"
'
fi
if test "$no_symlinks"
then
test_expect_success "detection of filesystem w/o symlink support during repo init" '
v=$(git config --bool core.symlinks) &&
test "$v" = false
'
else
test_expect_success "detection of filesystem w/o symlink support during repo init" '
test_must_fail git config --bool core.symlinks ||
test "$(git config --bool core.symlinks)" = true
'
fi
test_expect_success "setup case tests" '
git config core.ignorecase true &&
......
......@@ -4,7 +4,7 @@ test_description='update-index and add refuse to add beyond symlinks'
. ./test-lib.sh
test_expect_success setup '
test_expect_success SYMLINKS setup '
>a &&
mkdir b &&
ln -s b c &&
......@@ -12,12 +12,12 @@ test_expect_success setup '
git update-index --add a b/d
'
test_expect_success 'update-index --add beyond symlinks' '
test_expect_success SYMLINKS 'update-index --add beyond symlinks' '
test_must_fail git update-index --add c/d &&
! ( git ls-files | grep c/d )
'
test_expect_success 'add beyond symlinks' '
test_expect_success SYMLINKS 'add beyond symlinks' '
test_must_fail git add c/d &&
! ( git ls-files | grep c/d )
'
......
......@@ -7,41 +7,91 @@ test_description='Test various path utilities'
. ./test-lib.sh
norm_abs() {
test_expect_success "normalize absolute: $1 => $2" \
norm_path() {
test_expect_success $3 "normalize path: $1 => $2" \
"test \"\$(test-path-utils normalize_path_copy '$1')\" = '$2'"
}
# On Windows, we are using MSYS's bash, which mangles the paths.
# Absolute paths are anchored at the MSYS installation directory,
# which means that the path / accounts for this many characters:
rootoff=$(test-path-utils normalize_path_copy / | wc -c)
# Account for the trailing LF:
if test $rootoff = 2; then
rootoff= # we are on Unix
else
rootoff=$(($rootoff-1))
fi
ancestor() {
test_expect_success "longest ancestor: $1 $2 => $3" \
"test \"\$(test-path-utils longest_ancestor_length '$1' '$2')\" = '$3'"
# We do some math with the expected ancestor length.
expected=$3
if test -n "$rootoff" && test "x$expected" != x-1; then
expected=$(($expected+$rootoff))
fi
test_expect_success "longest ancestor: $1 $2 => $expected" \
"actual=\$(test-path-utils longest_ancestor_length '$1' '$2') &&
test \"\$actual\" = '$expected'"
}
norm_abs "" ""
norm_abs / /
norm_abs // /
norm_abs /// /
norm_abs /. /
norm_abs /./ /
norm_abs /./.. ++failed++
norm_abs /../. ++failed++
norm_abs /./../.// ++failed++
norm_abs /dir/.. /
norm_abs /dir/sub/../.. /
norm_abs /dir/sub/../../.. ++failed++
norm_abs /dir /dir
norm_abs /dir// /dir/
norm_abs /./dir /dir
norm_abs /dir/. /dir/
norm_abs /dir///./ /dir/
norm_abs /dir//sub/.. /dir/
norm_abs /dir/sub/../ /dir/
norm_abs //dir/sub/../. /dir/
norm_abs /dir/s1/../s2/ /dir/s2/
norm_abs /d1/s1///s2/..//../s3/ /d1/s3/
norm_abs /d1/s1//../s2/../../d2 /d2
norm_abs /d1/.../d2 /d1/.../d2
norm_abs /d1/..././../d2 /d1/d2
# Absolute path tests must be skipped on Windows because due to path mangling
# the test program never sees a POSIX-style absolute path
case $(uname -s) in
*MINGW*)
;;
*)
test_set_prereq POSIX
;;
esac
norm_path "" ""
norm_path . ""
norm_path ./ ""
norm_path ./. ""
norm_path ./.. ++failed++
norm_path ../. ++failed++
norm_path ./../.// ++failed++
norm_path dir/.. ""
norm_path dir/sub/../.. ""
norm_path dir/sub/../../.. ++failed++
norm_path dir dir
norm_path dir// dir/
norm_path ./dir dir
norm_path dir/. dir/
norm_path dir///./ dir/
norm_path dir//sub/.. dir/
norm_path dir/sub/../ dir/
norm_path dir/sub/../. dir/
norm_path dir/s1/../s2/ dir/s2/
norm_path d1/s1///s2/..//../s3/ d1/s3/
norm_path d1/s1//../s2/../../d2 d2
norm_path d1/.../d2 d1/.../d2
norm_path d1/..././../d2 d1/d2
norm_path / / POSIX
norm_path // / POSIX
norm_path /// / POSIX
norm_path /. / POSIX
norm_path /./ / POSIX
norm_path /./.. ++failed++ POSIX
norm_path /../. ++failed++ POSIX
norm_path /./../.// ++failed++ POSIX
norm_path /dir/.. / POSIX
norm_path /dir/sub/../.. / POSIX
norm_path /dir/sub/../../.. ++failed++ POSIX
norm_path /dir /dir POSIX
norm_path /dir// /dir/ POSIX
norm_path /./dir /dir POSIX
norm_path /dir/. /dir/ POSIX
norm_path /dir///./ /dir/ POSIX
norm_path /dir//sub/.. /dir/ POSIX
norm_path /dir/sub/../ /dir/ POSIX
norm_path //dir/sub/../. /dir/ POSIX
norm_path /dir/s1/../s2/ /dir/s2/ POSIX
norm_path /d1/s1///s2/..//../s3/ /d1/s3/ POSIX
norm_path /d1/s1//../s2/../../d2 /d2 POSIX
norm_path /d1/.../d2 /d1/.../d2 POSIX
norm_path /d1/..././../d2 /d1/d2 POSIX
ancestor / "" -1
ancestor / / -1
......@@ -80,10 +130,10 @@ ancestor /foo/bar /:/foo:/bar/ 4
ancestor /foo/bar /foo:/:/bar/ 4
ancestor /foo/bar /:/bar/:/fo 0
ancestor /foo/bar /:/bar/ 0
ancestor /foo/bar :://foo/. 4
ancestor /foo/bar :://foo/.:: 4
ancestor /foo/bar //foo/./::/bar 4
ancestor /foo/bar ::/bar -1
ancestor /foo/bar .:/foo/. 4
ancestor /foo/bar .:/foo/.:.: 4
ancestor /foo/bar /foo/./:.:/bar 4
ancestor /foo/bar .:/bar -1
test_expect_success 'strip_path_suffix' '
test c:/msysgit = $(test-path-utils strip_path_suffix \
......
......@@ -157,7 +157,7 @@ test_expect_success '3-way not overwriting local changes (their side)' '
'
test_expect_success 'funny symlink in work tree' '
test_expect_success SYMLINKS 'funny symlink in work tree' '
git reset --hard &&
git checkout -b sym-b side-b &&
......@@ -177,7 +177,7 @@ test_expect_success 'funny symlink in work tree' '
'
test_expect_success 'funny symlink in work tree, un-unlink-able' '
test_expect_success SYMLINKS 'funny symlink in work tree, un-unlink-able' '
rm -fr a b &&
git reset --hard &&
......@@ -189,7 +189,7 @@ test_expect_success 'funny symlink in work tree, un-unlink-able' '
'
# clean-up from the above test
chmod a+w a
chmod a+w a 2>/dev/null
rm -fr a b
test_expect_success 'D/F setup' '
......
......@@ -126,7 +126,7 @@ test_expect_success 'no file/rev ambiguity check inside a bare repo' '
cd foo.git && git show -s HEAD
'
test_expect_success 'detection should not be fooled by a symlink' '
test_expect_success SYMLINKS 'detection should not be fooled by a symlink' '
cd "$HERE" &&
rm -fr foo.git &&
git clone -s .git another &&
......
......@@ -733,7 +733,7 @@ echo >>result
test_expect_success '--null --get-regexp' 'cmp result expect'
test_expect_success 'symlinked configuration' '
test_expect_success SYMLINKS 'symlinked configuration' '
ln -s notyet myconfig &&
GIT_CONFIG=myconfig git config test.frotz nitfol &&
......
......@@ -26,7 +26,7 @@ modebits () {
for u in 002 022
do
test_expect_success "shared=1 does not clear bits preset by umask $u" '
test_expect_success POSIXPERM "shared=1 does not clear bits preset by umask $u" '
mkdir sub && (
cd sub &&
umask $u &&
......@@ -54,7 +54,7 @@ test_expect_success 'shared=all' '
test 2 = $(git config core.sharedrepository)
'
test_expect_success 'update-server-info honors core.sharedRepository' '
test_expect_success POSIXPERM 'update-server-info honors core.sharedRepository' '
: > a1 &&
git add a1 &&
test_tick &&
......@@ -85,7 +85,7 @@ do
git config core.sharedrepository "$u" &&
umask 0277 &&
test_expect_success "shared = $u ($y) ro" '
test_expect_success POSIXPERM "shared = $u ($y) ro" '
rm -f .git/info/refs &&
git update-server-info &&
......@@ -97,7 +97,7 @@ do
'
umask 077 &&
test_expect_success "shared = $u ($x) rw" '
test_expect_success POSIXPERM "shared = $u ($x) rw" '
rm -f .git/info/refs &&
git update-server-info &&
......@@ -111,7 +111,7 @@ do
done
test_expect_success 'git reflog expire honors core.sharedRepository' '
test_expect_success POSIXPERM 'git reflog expire honors core.sharedRepository' '
git config core.sharedRepository group &&
git reflog expire --all &&
actual="$(ls -l .git/logs/refs/heads/master)" &&
......
......@@ -13,7 +13,7 @@ test_fail() {
"git rev-parse --show-prefix"
}
TRASH_ROOT="$(pwd)"
TRASH_ROOT="$PWD"
ROOT_PARENT=$(dirname "$TRASH_ROOT")
......
......@@ -59,10 +59,10 @@ test_expect_success \
'git read-tree -m $tree1 && git checkout-index -f -a'
test_debug 'show_files $tree1'
ln -s path0 path1
test_expect_success \
test_expect_success SYMLINKS \
'git update-index --add a symlink.' \
'git update-index --add path1'
'ln -s path0 path1 &&
git update-index --add path1'
test_expect_success \
'writing tree out with git write-tree' \
'tree3=$(git write-tree)'
......
......@@ -19,7 +19,7 @@ test_expect_success \
echo rezrov >path1/file1 &&
git update-index --add path0 path1/file1'
test_expect_success \
test_expect_success SYMLINKS \
'have symlink in place where dir is expected.' \
'rm -fr path0 path1 &&
mkdir path2 &&
......@@ -59,7 +59,7 @@ test_expect_success \
test ! -f path1/file1'
# Linus fix #1
test_expect_success \
test_expect_success SYMLINKS \
'use --prefix=tmp/orary/ where tmp is a symlink' \
'rm -fr path0 path1 path2 tmp* &&
mkdir tmp1 tmp1/orary &&
......@@ -71,7 +71,7 @@ test_expect_success \
test -h tmp'
# Linus fix #2
test_expect_success \
test_expect_success SYMLINKS \
'use --prefix=tmp/orary- where tmp is a symlink' \
'rm -fr path0 path1 path2 tmp* &&
mkdir tmp1 &&
......@@ -82,7 +82,7 @@ test_expect_success \
test -h tmp'
# Linus fix #3
test_expect_success \
test_expect_success SYMLINKS \
'use --prefix=tmp- where tmp-path1 is a symlink' \
'rm -fr path0 path1 path2 tmp* &&
mkdir tmp1 &&
......
......@@ -194,7 +194,7 @@ test_expect_success \
test $(cat ../$s1) = tree1asubdir/path5)
)'
test_expect_success \
test_expect_success SYMLINKS \
'checkout --temp symlink' '
rm -f path* .merge_* out .git/index &&
ln -s b a &&
......
......@@ -6,6 +6,12 @@ test_description='git checkout to switch between branches with symlink<->dir'
. ./test-lib.sh
if ! test_have_prereq SYMLINKS
then
say "symbolic links not supported - skipping tests"
test_done
fi
test_expect_success setup '
mkdir frotz &&
......
......@@ -26,7 +26,12 @@ All of the attempts should fail.
mkdir path2 path3
date >path0
ln -s xyzzy path1
if test_have_prereq SYMLINKS
then
ln -s xyzzy path1
else
date > path1
fi
date >path2/file2
date >path3/file3
......@@ -38,7 +43,12 @@ rm -fr path?
mkdir path0 path1
date >path2
ln -s frotz path3
if test_have_prereq SYMLINKS
then
ln -s frotz path3
else
date > path3
fi
date >path0/file0
date >path1/file1
......
......@@ -80,7 +80,7 @@ test_expect_success 'change gets noticed' '
'
test_expect_success 'replace a file with a symlink' '
test_expect_success SYMLINKS 'replace a file with a symlink' '
rm foo &&
ln -s top foo &&
......
......@@ -11,7 +11,13 @@ test_expect_success setup '
_empty=$(git hash-object --stdin <xyzzy) &&
>yomin &&
>caskly &&
ln -s frotz nitfol &&
if test_have_prereq SYMLINKS; then
ln -s frotz nitfol &&
T_letter=T
else
printf %s frotz > nitfol &&
T_letter=M
fi &&
mkdir rezrov &&
>rezrov/bozbar &&
git add caskly xyzzy yomin nitfol rezrov/bozbar &&
......@@ -29,7 +35,11 @@ test_expect_success modify '
>nitfol &&
# rezrov/bozbar disappears
rm -fr rezrov &&
ln -s xyzzy rezrov &&
if test_have_prereq SYMLINKS; then
ln -s xyzzy rezrov
else
printf %s xyzzy > rezrov
fi &&
# xyzzy disappears (not a submodule)
mkdir xyzzy &&
echo gnusto >xyzzy/bozbar &&
......@@ -71,7 +81,7 @@ test_expect_success modify '
s/blob/000000/
}
/ nitfol/{
s/ nitfol/ $_z40 T&/
s/ nitfol/ $_z40 $T_letter&/
s/blob/100644/
}
/ rezrov.bozbar/{
......
......@@ -5,7 +5,7 @@ test_description='cd_to_toplevel'
. ./test-lib.sh
test_cd_to_toplevel () {
test_expect_success "$2" '
test_expect_success $3 "$2" '
(
cd '"'$1'"' &&
. git-sh-setup &&
......@@ -24,14 +24,14 @@ test_cd_to_toplevel repo 'at physical root'
test_cd_to_toplevel repo/sub/dir 'at physical subdir'
ln -s repo symrepo
test_cd_to_toplevel symrepo 'at symbolic root'
ln -s repo symrepo 2>/dev/null
test_cd_to_toplevel symrepo 'at symbolic root' SYMLINKS
ln -s repo/sub/dir subdir-link
test_cd_to_toplevel subdir-link 'at symbolic subdir'
ln -s repo/sub/dir subdir-link 2>/dev/null
test_cd_to_toplevel subdir-link 'at symbolic subdir' SYMLINKS
cd repo
ln -s sub/dir internal-link
test_cd_to_toplevel internal-link 'at internal symbolic subdir'
ln -s sub/dir internal-link 2>/dev/null
test_cd_to_toplevel internal-link 'at internal symbolic subdir' SYMLINKS
test_done
......@@ -18,7 +18,12 @@ filesystem.
. ./test-lib.sh
date >path0
ln -s xyzzy path1
if test_have_prereq SYMLINKS
then
ln -s xyzzy path1
else
date > path1
fi
mkdir path2 path3 path4
date >path2/file2
date >path2-junk
......
......@@ -38,7 +38,12 @@ modified without reporting path9 and path10.
. ./test-lib.sh
date >path0
ln -s xyzzy path1
if test_have_prereq SYMLINKS
then
ln -s xyzzy path1
else
date > path1
fi
mkdir path2 path3
date >path2/file2
date >path3/file3
......@@ -52,8 +57,14 @@ test_expect_success \
rm -fr path? ;# leave path10 alone
date >path2
ln -s frotz path3
ln -s nitfol path5
if test_have_prereq SYMLINKS
then
ln -s frotz path3
ln -s nitfol path5
else
date > path3
date > path5
fi
mkdir path0 path1 path6
date >path0/file0
date >path1/file1
......
......@@ -22,9 +22,21 @@ test_expect_success \
'setup' \
'mkdir path2 path2/baz &&
echo Hi >path0 &&
ln -s path0 path1 &&
if test_have_prereq SYMLINKS
then
ln -s path0 path1 &&
ln -s ../path1 path2/bazbo
make_expected () {
cat >expected