Skip to content

Commit

Permalink
mingw: handle the missing POSIXPERM prereq in t9124
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Johannes Schindelin authored and Junio C Hamano committed Jan 28, 2016
1 parent 75e005e commit b2fe065
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions t/t9124-git-svn-dcommit-auto-props.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 &&
Expand All @@ -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 &&
Expand All @@ -65,15 +63,21 @@ 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" &&
test "x$(svn_cmd propget svn:eol-style hello.txt)" = "xnative" &&
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" &&
Expand Down

0 comments on commit b2fe065

Please sign in to comment.