Commit b018c735 authored by Jonathan Nieder's avatar Jonathan Nieder Committed by Junio C Hamano

test: make FILEMODE a lazy prereq

This way, test authors don't need to remember to source
lib-prereq-FILEMODE.sh before using the FILEMODE prereq to guard tests
that rely on the executable bit being honored when checking out files.
Signed-off-by: default avatarJonathan Nieder <[email protected]>
Signed-off-by: default avatarJunio C Hamano <[email protected]>
parent 30a3318a
#!/bin/sh
#
# Copyright (c) 2010 Ævar Arnfjörð Bjarmason
#
if test "$(git config --bool core.filemode)" = false
then
say 'filemode disabled on the filesystem'
else
test_set_prereq FILEMODE
fi
......@@ -2,7 +2,6 @@
test_description='add -i basic tests'
. ./test-lib.sh
. "$TEST_DIRECTORY"/lib-prereq-FILEMODE.sh
if ! test_have_prereq PERL
then
......
......@@ -7,7 +7,6 @@ test_description='git apply handling copy/rename patch.
'
. ./test-lib.sh
. "$TEST_DIRECTORY"/lib-prereq-FILEMODE.sh
# setup
......
......@@ -6,7 +6,6 @@
test_description='git apply -p handling.'
. ./test-lib.sh
. "$TEST_DIRECTORY"/lib-prereq-FILEMODE.sh
test_expect_success setup '
mkdir sub &&
......
......@@ -3,7 +3,6 @@
test_description='applying patch with mode bits'
. ./test-lib.sh
. "$TEST_DIRECTORY"/lib-prereq-FILEMODE.sh
test_expect_success setup '
echo original >file &&
......
......@@ -2,7 +2,6 @@
test_description='merge-recursive: handle file mode'
. ./test-lib.sh
. "$TEST_DIRECTORY"/lib-prereq-FILEMODE.sh
test_expect_success 'mode change in one branch: keep changed version' '
: >file1 &&
......
......@@ -5,7 +5,6 @@
test_description='Test export of commits to CVS'
. ./test-lib.sh
. "$TEST_DIRECTORY"/lib-prereq-FILEMODE.sh
if ! test_have_prereq PERL; then
skip_all='skipping git cvsexportcommit tests, perl not available'
......
......@@ -830,6 +830,10 @@ test_lazy_prereq SYMLINKS '
ln -s x y && test -h y
'
test_lazy_prereq FILEMODE '
test "$(git config --bool core.filemode)" = true
'
test_lazy_prereq CASE_INSENSITIVE_FS '
echo good >CamelCase &&
echo bad >camelcase &&
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment