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: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
30a3318ac0
commit
b018c73526
@ -1,11 +0,0 @@
|
|||||||
#!/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_description='add -i basic tests'
|
||||||
. ./test-lib.sh
|
. ./test-lib.sh
|
||||||
. "$TEST_DIRECTORY"/lib-prereq-FILEMODE.sh
|
|
||||||
|
|
||||||
if ! test_have_prereq PERL
|
if ! test_have_prereq PERL
|
||||||
then
|
then
|
||||||
|
@ -7,7 +7,6 @@ test_description='git apply handling copy/rename patch.
|
|||||||
|
|
||||||
'
|
'
|
||||||
. ./test-lib.sh
|
. ./test-lib.sh
|
||||||
. "$TEST_DIRECTORY"/lib-prereq-FILEMODE.sh
|
|
||||||
|
|
||||||
# setup
|
# setup
|
||||||
|
|
||||||
|
@ -6,7 +6,6 @@
|
|||||||
test_description='git apply -p handling.'
|
test_description='git apply -p handling.'
|
||||||
|
|
||||||
. ./test-lib.sh
|
. ./test-lib.sh
|
||||||
. "$TEST_DIRECTORY"/lib-prereq-FILEMODE.sh
|
|
||||||
|
|
||||||
test_expect_success setup '
|
test_expect_success setup '
|
||||||
mkdir sub &&
|
mkdir sub &&
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
test_description='applying patch with mode bits'
|
test_description='applying patch with mode bits'
|
||||||
|
|
||||||
. ./test-lib.sh
|
. ./test-lib.sh
|
||||||
. "$TEST_DIRECTORY"/lib-prereq-FILEMODE.sh
|
|
||||||
|
|
||||||
test_expect_success setup '
|
test_expect_success setup '
|
||||||
echo original >file &&
|
echo original >file &&
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
test_description='merge-recursive: handle file mode'
|
test_description='merge-recursive: handle file mode'
|
||||||
. ./test-lib.sh
|
. ./test-lib.sh
|
||||||
. "$TEST_DIRECTORY"/lib-prereq-FILEMODE.sh
|
|
||||||
|
|
||||||
test_expect_success 'mode change in one branch: keep changed version' '
|
test_expect_success 'mode change in one branch: keep changed version' '
|
||||||
: >file1 &&
|
: >file1 &&
|
||||||
|
@ -5,7 +5,6 @@
|
|||||||
test_description='Test export of commits to CVS'
|
test_description='Test export of commits to CVS'
|
||||||
|
|
||||||
. ./test-lib.sh
|
. ./test-lib.sh
|
||||||
. "$TEST_DIRECTORY"/lib-prereq-FILEMODE.sh
|
|
||||||
|
|
||||||
if ! test_have_prereq PERL; then
|
if ! test_have_prereq PERL; then
|
||||||
skip_all='skipping git cvsexportcommit tests, perl not available'
|
skip_all='skipping git cvsexportcommit tests, perl not available'
|
||||||
|
@ -830,6 +830,10 @@ test_lazy_prereq SYMLINKS '
|
|||||||
ln -s x y && test -h y
|
ln -s x y && test -h y
|
||||||
'
|
'
|
||||||
|
|
||||||
|
test_lazy_prereq FILEMODE '
|
||||||
|
test "$(git config --bool core.filemode)" = true
|
||||||
|
'
|
||||||
|
|
||||||
test_lazy_prereq CASE_INSENSITIVE_FS '
|
test_lazy_prereq CASE_INSENSITIVE_FS '
|
||||||
echo good >CamelCase &&
|
echo good >CamelCase &&
|
||||||
echo bad >camelcase &&
|
echo bad >camelcase &&
|
||||||
|
Loading…
Reference in New Issue
Block a user