Skip to content

Commit be5a9ad

Browse files
committed
mingw: handle the missing POSIXPERM prereq in t9124
On Windows, the permission system works completely differently than expected by some of the tests. So let's make sure that we do not test POSIX functionality on Windows. This lets t9124-git-svn-dcommit-auto-props.sh pass in Git for Windows' SDK. Signed-off-by: Johannes Schindelin <[email protected]>
1 parent 01466a8 commit be5a9ad

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

t/t9124-git-svn-dcommit-auto-props.sh

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,7 @@ test_expect_success 'enable auto-props config' '
3434
'
3535

3636
test_expect_success 'add files matching auto-props' '
37-
echo "#!$SHELL_PATH" >exec1.sh &&
38-
chmod +x exec1.sh &&
37+
write_script exec1.sh </dev/null &&
3938
echo "hello" >hello.txt &&
4039
echo bar >bar &&
4140
git add exec1.sh hello.txt bar &&
@@ -48,8 +47,7 @@ test_expect_success 'disable auto-props config' '
4847
'
4948

5049
test_expect_success 'add files matching disabled auto-props' '
51-
echo "#$SHELL_PATH" >exec2.sh &&
52-
chmod +x exec2.sh &&
50+
write_script exec2.sh </dev/null &&
5351
echo "world" >world.txt &&
5452
echo zot >zot &&
5553
git add exec2.sh world.txt zot &&
@@ -65,15 +63,21 @@ test_expect_success 'check resulting svn repository' '
6563
cd svnrepo &&
6664
6765
# Check properties from first commit.
68-
test "x$(svn_cmd propget svn:executable exec1.sh)" = "x*" &&
66+
if test_have_prereq POSIXPERM
67+
then
68+
test "x$(svn_cmd propget svn:executable exec1.sh)" = "x*"
69+
fi &&
6970
test "x$(svn_cmd propget svn:mime-type exec1.sh)" = \
7071
"xapplication/x-shellscript" &&
7172
test "x$(svn_cmd propget svn:mime-type hello.txt)" = "xtext/plain" &&
7273
test "x$(svn_cmd propget svn:eol-style hello.txt)" = "xnative" &&
7374
test "x$(svn_cmd propget svn:mime-type bar)" = "x" &&
7475
7576
# Check properties from second commit.
76-
test "x$(svn_cmd propget svn:executable exec2.sh)" = "x*" &&
77+
if test_have_prereq POSIXPERM
78+
then
79+
test "x$(svn_cmd propget svn:executable exec2.sh)" = "x*"
80+
fi &&
7781
test "x$(svn_cmd propget svn:mime-type exec2.sh)" = "x" &&
7882
test "x$(svn_cmd propget svn:mime-type world.txt)" = "x" &&
7983
test "x$(svn_cmd propget svn:eol-style world.txt)" = "x" &&

0 commit comments

Comments
 (0)