t3100: use test_ln_s_add to remove SYMLINKS prerequisite
This undoes the special casing introduced in this test by 704a3143
(Use prerequisite tags to skip tests that depend on symbolic links,
2009-03-04).
Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
bba56042e7
commit
e40db07f5f
@ -22,20 +22,8 @@ test_expect_success \
|
|||||||
'setup' \
|
'setup' \
|
||||||
'mkdir path2 path2/baz &&
|
'mkdir path2 path2/baz &&
|
||||||
echo Hi >path0 &&
|
echo Hi >path0 &&
|
||||||
if test_have_prereq SYMLINKS
|
test_ln_s_add path0 path1 &&
|
||||||
then
|
test_ln_s_add ../path1 path2/bazbo &&
|
||||||
ln -s path0 path1 &&
|
|
||||||
ln -s ../path1 path2/bazbo
|
|
||||||
make_expected () {
|
|
||||||
cat >expected
|
|
||||||
}
|
|
||||||
else
|
|
||||||
printf path0 > path1 &&
|
|
||||||
printf ../path1 > path2/bazbo
|
|
||||||
make_expected () {
|
|
||||||
sed -e "s/120000 /100644 /" >expected
|
|
||||||
}
|
|
||||||
fi &&
|
|
||||||
echo Lo >path2/foo &&
|
echo Lo >path2/foo &&
|
||||||
echo Mi >path2/baz/b &&
|
echo Mi >path2/baz/b &&
|
||||||
find path? \( -type f -o -type l \) -print |
|
find path? \( -type f -o -type l \) -print |
|
||||||
@ -51,7 +39,7 @@ test_output () {
|
|||||||
test_expect_success \
|
test_expect_success \
|
||||||
'ls-tree plain' \
|
'ls-tree plain' \
|
||||||
'git ls-tree $tree >current &&
|
'git ls-tree $tree >current &&
|
||||||
make_expected <<\EOF &&
|
cat >expected <<\EOF &&
|
||||||
100644 blob X path0
|
100644 blob X path0
|
||||||
120000 blob X path1
|
120000 blob X path1
|
||||||
040000 tree X path2
|
040000 tree X path2
|
||||||
@ -61,7 +49,7 @@ EOF
|
|||||||
test_expect_success \
|
test_expect_success \
|
||||||
'ls-tree recursive' \
|
'ls-tree recursive' \
|
||||||
'git ls-tree -r $tree >current &&
|
'git ls-tree -r $tree >current &&
|
||||||
make_expected <<\EOF &&
|
cat >expected <<\EOF &&
|
||||||
100644 blob X path0
|
100644 blob X path0
|
||||||
120000 blob X path1
|
120000 blob X path1
|
||||||
100644 blob X path2/baz/b
|
100644 blob X path2/baz/b
|
||||||
@ -73,7 +61,7 @@ EOF
|
|||||||
test_expect_success \
|
test_expect_success \
|
||||||
'ls-tree recursive with -t' \
|
'ls-tree recursive with -t' \
|
||||||
'git ls-tree -r -t $tree >current &&
|
'git ls-tree -r -t $tree >current &&
|
||||||
make_expected <<\EOF &&
|
cat >expected <<\EOF &&
|
||||||
100644 blob X path0
|
100644 blob X path0
|
||||||
120000 blob X path1
|
120000 blob X path1
|
||||||
040000 tree X path2
|
040000 tree X path2
|
||||||
@ -87,7 +75,7 @@ EOF
|
|||||||
test_expect_success \
|
test_expect_success \
|
||||||
'ls-tree recursive with -d' \
|
'ls-tree recursive with -d' \
|
||||||
'git ls-tree -r -d $tree >current &&
|
'git ls-tree -r -d $tree >current &&
|
||||||
make_expected <<\EOF &&
|
cat >expected <<\EOF &&
|
||||||
040000 tree X path2
|
040000 tree X path2
|
||||||
040000 tree X path2/baz
|
040000 tree X path2/baz
|
||||||
EOF
|
EOF
|
||||||
@ -96,7 +84,7 @@ EOF
|
|||||||
test_expect_success \
|
test_expect_success \
|
||||||
'ls-tree filtered with path' \
|
'ls-tree filtered with path' \
|
||||||
'git ls-tree $tree path >current &&
|
'git ls-tree $tree path >current &&
|
||||||
make_expected <<\EOF &&
|
cat >expected <<\EOF &&
|
||||||
EOF
|
EOF
|
||||||
test_output'
|
test_output'
|
||||||
|
|
||||||
@ -106,7 +94,7 @@ EOF
|
|||||||
test_expect_success \
|
test_expect_success \
|
||||||
'ls-tree filtered with path1 path0' \
|
'ls-tree filtered with path1 path0' \
|
||||||
'git ls-tree $tree path1 path0 >current &&
|
'git ls-tree $tree path1 path0 >current &&
|
||||||
make_expected <<\EOF &&
|
cat >expected <<\EOF &&
|
||||||
100644 blob X path0
|
100644 blob X path0
|
||||||
120000 blob X path1
|
120000 blob X path1
|
||||||
EOF
|
EOF
|
||||||
@ -115,7 +103,7 @@ EOF
|
|||||||
test_expect_success \
|
test_expect_success \
|
||||||
'ls-tree filtered with path0/' \
|
'ls-tree filtered with path0/' \
|
||||||
'git ls-tree $tree path0/ >current &&
|
'git ls-tree $tree path0/ >current &&
|
||||||
make_expected <<\EOF &&
|
cat >expected <<\EOF &&
|
||||||
EOF
|
EOF
|
||||||
test_output'
|
test_output'
|
||||||
|
|
||||||
@ -124,7 +112,7 @@ EOF
|
|||||||
test_expect_success \
|
test_expect_success \
|
||||||
'ls-tree filtered with path2' \
|
'ls-tree filtered with path2' \
|
||||||
'git ls-tree $tree path2 >current &&
|
'git ls-tree $tree path2 >current &&
|
||||||
make_expected <<\EOF &&
|
cat >expected <<\EOF &&
|
||||||
040000 tree X path2
|
040000 tree X path2
|
||||||
EOF
|
EOF
|
||||||
test_output'
|
test_output'
|
||||||
@ -133,7 +121,7 @@ EOF
|
|||||||
test_expect_success \
|
test_expect_success \
|
||||||
'ls-tree filtered with path2/' \
|
'ls-tree filtered with path2/' \
|
||||||
'git ls-tree $tree path2/ >current &&
|
'git ls-tree $tree path2/ >current &&
|
||||||
make_expected <<\EOF &&
|
cat >expected <<\EOF &&
|
||||||
040000 tree X path2/baz
|
040000 tree X path2/baz
|
||||||
120000 blob X path2/bazbo
|
120000 blob X path2/bazbo
|
||||||
100644 blob X path2/foo
|
100644 blob X path2/foo
|
||||||
@ -145,7 +133,7 @@ EOF
|
|||||||
test_expect_success \
|
test_expect_success \
|
||||||
'ls-tree filtered with path2/baz' \
|
'ls-tree filtered with path2/baz' \
|
||||||
'git ls-tree $tree path2/baz >current &&
|
'git ls-tree $tree path2/baz >current &&
|
||||||
make_expected <<\EOF &&
|
cat >expected <<\EOF &&
|
||||||
040000 tree X path2/baz
|
040000 tree X path2/baz
|
||||||
EOF
|
EOF
|
||||||
test_output'
|
test_output'
|
||||||
@ -153,14 +141,14 @@ EOF
|
|||||||
test_expect_success \
|
test_expect_success \
|
||||||
'ls-tree filtered with path2/bak' \
|
'ls-tree filtered with path2/bak' \
|
||||||
'git ls-tree $tree path2/bak >current &&
|
'git ls-tree $tree path2/bak >current &&
|
||||||
make_expected <<\EOF &&
|
cat >expected <<\EOF &&
|
||||||
EOF
|
EOF
|
||||||
test_output'
|
test_output'
|
||||||
|
|
||||||
test_expect_success \
|
test_expect_success \
|
||||||
'ls-tree -t filtered with path2/bak' \
|
'ls-tree -t filtered with path2/bak' \
|
||||||
'git ls-tree -t $tree path2/bak >current &&
|
'git ls-tree -t $tree path2/bak >current &&
|
||||||
make_expected <<\EOF &&
|
cat >expected <<\EOF &&
|
||||||
040000 tree X path2
|
040000 tree X path2
|
||||||
EOF
|
EOF
|
||||||
test_output'
|
test_output'
|
||||||
@ -168,7 +156,7 @@ EOF
|
|||||||
test_expect_success \
|
test_expect_success \
|
||||||
'ls-tree with one path a prefix of the other' \
|
'ls-tree with one path a prefix of the other' \
|
||||||
'git ls-tree $tree path2/baz path2/bazbo >current &&
|
'git ls-tree $tree path2/baz path2/bazbo >current &&
|
||||||
make_expected <<\EOF &&
|
cat >expected <<\EOF &&
|
||||||
040000 tree X path2/baz
|
040000 tree X path2/baz
|
||||||
120000 blob X path2/bazbo
|
120000 blob X path2/bazbo
|
||||||
EOF
|
EOF
|
||||||
|
Loading…
Reference in New Issue
Block a user