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>

Johannes Sixt committed Jun 7, 2013 at 22:53 UTC e40db07f5f4e46dc8678f81b672a0466d4d5b7ad
1 file changed +15 -27
t/t3100-ls-tree-restrict.sh
+15 -27
@@ -22,20 +22,8 @@ test_expect_success \
22 'setup' \
23 'mkdir path2 path2/baz &&
24 echo Hi >path0 &&
25 - if test_have_prereq SYMLINKS
26 - then
27 - ln -s path0 path1 &&
28 - ln -s ../path1 path2/bazbo
29 - make_expected () {
30 - cat >expected
31 - }
32 - else
33 - printf path0 > path1 &&
34 - printf ../path1 > path2/bazbo
35 - make_expected () {
36 - sed -e "s/120000 /100644 /" >expected
37 - }
38 - fi &&
25 + test_ln_s_add path0 path1 &&
26 + test_ln_s_add ../path1 path2/bazbo &&
27 echo Lo >path2/foo &&
28 echo Mi >path2/baz/b &&
29 find path? \( -type f -o -type l \) -print |
@@ -51,7 +39,7 @@ test_output () {
39 test_expect_success \
40 'ls-tree plain' \
41 'git ls-tree $tree >current &&
54 - make_expected <<\EOF &&
42 + cat >expected <<\EOF &&
43 100644 blob X path0
44 120000 blob X path1
45 040000 tree X path2
@@ -61,7 +49,7 @@ EOF
49 test_expect_success \
50 'ls-tree recursive' \
51 'git ls-tree -r $tree >current &&
64 - make_expected <<\EOF &&
52 + cat >expected <<\EOF &&
53 100644 blob X path0
54 120000 blob X path1
55 100644 blob X path2/baz/b
@@ -73,7 +61,7 @@ EOF
61 test_expect_success \
62 'ls-tree recursive with -t' \
63 'git ls-tree -r -t $tree >current &&
76 - make_expected <<\EOF &&
64 + cat >expected <<\EOF &&
65 100644 blob X path0
66 120000 blob X path1
67 040000 tree X path2
@@ -87,7 +75,7 @@ EOF
75 test_expect_success \
76 'ls-tree recursive with -d' \
77 'git ls-tree -r -d $tree >current &&
90 - make_expected <<\EOF &&
78 + cat >expected <<\EOF &&
79 040000 tree X path2
80 040000 tree X path2/baz
81 EOF
@@ -96,7 +84,7 @@ EOF
84 test_expect_success \
85 'ls-tree filtered with path' \
86 'git ls-tree $tree path >current &&
99 - make_expected <<\EOF &&
87 + cat >expected <<\EOF &&
88 EOF
89 test_output'
90
@@ -106,7 +94,7 @@ EOF
94 test_expect_success \
95 'ls-tree filtered with path1 path0' \
96 'git ls-tree $tree path1 path0 >current &&
109 - make_expected <<\EOF &&
97 + cat >expected <<\EOF &&
98 100644 blob X path0
99 120000 blob X path1
100 EOF
@@ -115,7 +103,7 @@ EOF
103 test_expect_success \
104 'ls-tree filtered with path0/' \
105 'git ls-tree $tree path0/ >current &&
118 - make_expected <<\EOF &&
106 + cat >expected <<\EOF &&
107 EOF
108 test_output'
109
@@ -124,7 +112,7 @@ EOF
112 test_expect_success \
113 'ls-tree filtered with path2' \
114 'git ls-tree $tree path2 >current &&
127 - make_expected <<\EOF &&
115 + cat >expected <<\EOF &&
116 040000 tree X path2
117 EOF
118 test_output'
@@ -133,7 +121,7 @@ EOF
121 test_expect_success \
122 'ls-tree filtered with path2/' \
123 'git ls-tree $tree path2/ >current &&
136 - make_expected <<\EOF &&
124 + cat >expected <<\EOF &&
125 040000 tree X path2/baz
126 120000 blob X path2/bazbo
127 100644 blob X path2/foo
@@ -145,7 +133,7 @@ EOF
133 test_expect_success \
134 'ls-tree filtered with path2/baz' \
135 'git ls-tree $tree path2/baz >current &&
148 - make_expected <<\EOF &&
136 + cat >expected <<\EOF &&
137 040000 tree X path2/baz
138 EOF
139 test_output'
@@ -153,14 +141,14 @@ EOF
141 test_expect_success \
142 'ls-tree filtered with path2/bak' \
143 'git ls-tree $tree path2/bak >current &&
156 - make_expected <<\EOF &&
144 + cat >expected <<\EOF &&
145 EOF
146 test_output'
147
148 test_expect_success \
149 'ls-tree -t filtered with path2/bak' \
150 'git ls-tree -t $tree path2/bak >current &&
163 - make_expected <<\EOF &&
151 + cat >expected <<\EOF &&
152 040000 tree X path2
153 EOF
154 test_output'
@@ -168,7 +156,7 @@ EOF
156 test_expect_success \
157 'ls-tree with one path a prefix of the other' \
158 'git ls-tree $tree path2/baz path2/bazbo >current &&
171 - make_expected <<\EOF &&
159 + cat >expected <<\EOF &&
160 040000 tree X path2/baz
161 120000 blob X path2/bazbo
162 EOF