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 <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Johannes Schindelin committed
Jan 27, 2016 at 17:20 UTC
b2fe06572226a6056776e3a4e5cd4ad273e60c08
1 file changed
+10
-6
t/t9124-git-svn-dcommit-auto-props.sh
+10
-6
@@ -34,8 +34,7 @@ test_expect_success 'enable auto-props config' '
34
'
35
36
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 &&
38
echo "hello" >hello.txt &&
39
echo bar >bar &&
40
git add exec1.sh hello.txt bar &&
@@ -48,8 +47,7 @@ test_expect_success 'disable auto-props config' '
47
'
48
49
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 &&
51
echo "world" >world.txt &&
52
echo zot >zot &&
53
git add exec2.sh world.txt zot &&
@@ -65,7 +63,10 @@ test_expect_success 'check resulting svn repository' '
63
cd svnrepo &&
64
65
# 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 &&
70
test "x$(svn_cmd propget svn:mime-type exec1.sh)" = \
71
"xapplication/x-shellscript" &&
72
test "x$(svn_cmd propget svn:mime-type hello.txt)" = "xtext/plain" &&
@@ -73,7 +74,10 @@ test_expect_success 'check resulting svn repository' '
74
test "x$(svn_cmd propget svn:mime-type bar)" = "x" &&
75
76
# 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 &&
81
test "x$(svn_cmd propget svn:mime-type exec2.sh)" = "x" &&
82
test "x$(svn_cmd propget svn:mime-type world.txt)" = "x" &&
83
test "x$(svn_cmd propget svn:eol-style world.txt)" = "x" &&