summaryrefslogtreecommitdiff
path: root/t/t9124-git-svn-dcommit-auto-props.sh
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2016-01-27 16:20:15 (GMT)
committerJunio C Hamano <gitster@pobox.com>2016-01-28 21:36:11 (GMT)
commitb2fe06572226a6056776e3a4e5cd4ad273e60c08 (patch)
tree9cfa785df8478f61e0ca02ea041cfe4e2b0cc3b7 /t/t9124-git-svn-dcommit-auto-props.sh
parent75e005ec541e46f3cdec15143306c7189fd65a95 (diff)
downloadgit-b2fe06572226a6056776e3a4e5cd4ad273e60c08.zip
git-b2fe06572226a6056776e3a4e5cd4ad273e60c08.tar.gz
git-b2fe06572226a6056776e3a4e5cd4ad273e60c08.tar.bz2
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>
Diffstat (limited to 't/t9124-git-svn-dcommit-auto-props.sh')
-rwxr-xr-xt/t9124-git-svn-dcommit-auto-props.sh16
1 files changed, 10 insertions, 6 deletions
diff --git a/t/t9124-git-svn-dcommit-auto-props.sh b/t/t9124-git-svn-dcommit-auto-props.sh
index aa841e1..9f7231d 100755
--- a/t/t9124-git-svn-dcommit-auto-props.sh
+++ b/t/t9124-git-svn-dcommit-auto-props.sh
@@ -34,8 +34,7 @@ test_expect_success 'enable auto-props config' '
'
test_expect_success 'add files matching auto-props' '
- echo "#!$SHELL_PATH" >exec1.sh &&
- chmod +x exec1.sh &&
+ write_script exec1.sh </dev/null &&
echo "hello" >hello.txt &&
echo bar >bar &&
git add exec1.sh hello.txt bar &&
@@ -48,8 +47,7 @@ test_expect_success 'disable auto-props config' '
'
test_expect_success 'add files matching disabled auto-props' '
- echo "#$SHELL_PATH" >exec2.sh &&
- chmod +x exec2.sh &&
+ write_script exec2.sh </dev/null &&
echo "world" >world.txt &&
echo zot >zot &&
git add exec2.sh world.txt zot &&
@@ -65,7 +63,10 @@ test_expect_success 'check resulting svn repository' '
cd svnrepo &&
# Check properties from first commit.
- test "x$(svn_cmd propget svn:executable exec1.sh)" = "x*" &&
+ if test_have_prereq POSIXPERM
+ then
+ test "x$(svn_cmd propget svn:executable exec1.sh)" = "x*"
+ fi &&
test "x$(svn_cmd propget svn:mime-type exec1.sh)" = \
"xapplication/x-shellscript" &&
test "x$(svn_cmd propget svn:mime-type hello.txt)" = "xtext/plain" &&
@@ -73,7 +74,10 @@ test_expect_success 'check resulting svn repository' '
test "x$(svn_cmd propget svn:mime-type bar)" = "x" &&
# Check properties from second commit.
- test "x$(svn_cmd propget svn:executable exec2.sh)" = "x*" &&
+ if test_have_prereq POSIXPERM
+ then
+ test "x$(svn_cmd propget svn:executable exec2.sh)" = "x*"
+ fi &&
test "x$(svn_cmd propget svn:mime-type exec2.sh)" = "x" &&
test "x$(svn_cmd propget svn:mime-type world.txt)" = "x" &&
test "x$(svn_cmd propget svn:eol-style world.txt)" = "x" &&