Skip to content

Commit 537b1bb

Browse files
committed
mingw: mark t9100's test cases with appropriate prereqs
Many a test requires either POSIXPERM (to change the executable bit) or SYMLINKS, and neither are available on Windows. This lets t9100-git-svn-basic.sh pass in Git for Windows' SDK. Signed-off-by: Johannes Schindelin <[email protected]>
1 parent bd210de commit 537b1bb

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

t/t9100-git-svn-basic.sh

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@ test_expect_success \
3030
echo "deep dir" >dir/a/b/c/d/e/file &&
3131
mkdir bar &&
3232
echo "zzz" >bar/zzz &&
33-
echo "#!/bin/sh" >exec.sh &&
34-
chmod +x exec.sh &&
33+
write_script exec.sh </dev/null &&
3534
svn_cmd import -m "import for git svn" . "$svnrepo" >/dev/null
3635
) &&
3736
rm -rf import &&
@@ -117,7 +116,7 @@ test_expect_success "$name" '
117116

118117

119118
name='remove executable bit from a file'
120-
test_expect_success "$name" '
119+
test_expect_success POSIXPERM "$name" '
121120
rm -f "$GIT_DIR"/index &&
122121
git checkout -f -b mybranch5 ${remotes_git_svn} &&
123122
chmod -x exec.sh &&
@@ -130,7 +129,7 @@ test_expect_success "$name" '
130129

131130

132131
name='add executable bit back file'
133-
test_expect_success "$name" '
132+
test_expect_success POSIXPERM "$name" '
134133
chmod +x exec.sh &&
135134
git update-index exec.sh &&
136135
git commit -m "$name" &&
@@ -141,7 +140,7 @@ test_expect_success "$name" '
141140

142141

143142
name='executable file becomes a symlink to file'
144-
test_expect_success "$name" '
143+
test_expect_success SYMLINKS "$name" '
145144
rm exec.sh &&
146145
ln -s file exec.sh &&
147146
git update-index exec.sh &&
@@ -153,7 +152,7 @@ test_expect_success "$name" '
153152

154153
name='new symlink is added to a file that was also just made executable'
155154

156-
test_expect_success "$name" '
155+
test_expect_success POSIXPERM,SYMLINKS "$name" '
157156
chmod +x file &&
158157
ln -s file exec-2.sh &&
159158
git update-index --add file exec-2.sh &&
@@ -165,7 +164,7 @@ test_expect_success "$name" '
165164
test -h "$SVN_TREE"/exec-2.sh'
166165

167166
name='modify a symlink to become a file'
168-
test_expect_success "$name" '
167+
test_expect_success POSIXPERM,SYMLINKS "$name" '
169168
echo git help >help &&
170169
rm exec-2.sh &&
171170
cp help exec-2.sh &&
@@ -181,7 +180,8 @@ test_expect_success "$name" '
181180
name="commit with UTF-8 message: locale: $GIT_SVN_LC_ALL"
182181
LC_ALL="$GIT_SVN_LC_ALL"
183182
export LC_ALL
184-
test_expect_success UTF8 "$name" "
183+
# This test relies on the previous test, hence requires POSIXPERM,SYMLINKS
184+
test_expect_success UTF8,POSIXPERM,SYMLINKS "$name" "
185185
echo '# hello' >> exec-2.sh &&
186186
git update-index exec-2.sh &&
187187
git commit -m 'éï∏' &&
@@ -214,7 +214,7 @@ tree d667270a1f7b109f5eb3aaea21ede14b56bfdd6e
214214
tree 8f51f74cf0163afc9ad68a4b1537288c4558b5a4
215215
EOF
216216

217-
test_expect_success "$name" "test_cmp a expected"
217+
test_expect_success POSIXPERM,SYMLINKS "$name" "test_cmp a expected"
218218

219219
test_expect_success 'exit if remote refs are ambigious' "
220220
git config --add svn-remote.svn.fetch \

0 commit comments

Comments
 (0)